init: rough companion app stub
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user