Files
companion/lib/domain/models/server_config.dart
T
2026-05-07 18:35:58 +02:00

19 lines
494 B
Dart

class ServerConfig {
const ServerConfig({required this.host, required this.port});
final String host;
final int port;
String get wsUrl => 'ws://$host:$port/socket/websocket';
ServerConfig copyWith({String? host, int? port}) =>
ServerConfig(host: host ?? this.host, port: port ?? this.port);
@override
bool operator ==(Object other) =>
other is ServerConfig && other.host == host && other.port == port;
@override
int get hashCode => Object.hash(host, port);
}