Files

48 lines
1.1 KiB
Dart
Raw Permalink Normal View History

2026-07-14 11:11:36 +08:00
import 'package:flutter/foundation.dart';
import '../../../core/contracts/library.dart';
@immutable
class PlaybackServerIdentity {
const PlaybackServerIdentity({
required this.serverId,
required this.baseUrl,
required this.token,
required this.userId,
required this.serverName,
});
factory PlaybackServerIdentity.fromCard(CrossServerSourceCard card) =>
PlaybackServerIdentity(
serverId: card.serverId,
baseUrl: card.serverUrl,
token: card.token,
userId: card.userId,
serverName: card.serverName,
);
final String serverId;
final String baseUrl;
final String token;
final String userId;
final String serverName;
@override
bool operator ==(Object other) =>
other is PlaybackServerIdentity &&
other.serverId == serverId &&
other.baseUrl == baseUrl &&
other.token == token &&
other.userId == userId &&
other.serverName == serverName;
@override
int get hashCode => Object.hash(serverId, baseUrl, token, userId, serverName);
@override
String toString() =>
'PlaybackServerIdentity(serverId=$serverId, serverName=$serverName)';
}