@@ -5,10 +5,13 @@ class NetworkConfig {
55 required this .host,
66 required this .port,
77 required this .nickname,
8+ this .altNickname,
89 this .username = 'androidircx' ,
910 this .realName = 'AndroidIRCX' ,
1011 this .useTls = true ,
1112 this .password,
13+ this .saslAccount,
14+ this .saslPassword,
1215 this .autoConnect = false ,
1316 });
1417
@@ -17,10 +20,13 @@ class NetworkConfig {
1720 final String host;
1821 final int port;
1922 final String nickname;
23+ final String ? altNickname;
2024 final String username;
2125 final String realName;
2226 final bool useTls;
2327 final String ? password;
28+ final String ? saslAccount;
29+ final String ? saslPassword;
2430 final bool autoConnect;
2531
2632 NetworkConfig copyWith ({
@@ -29,10 +35,13 @@ class NetworkConfig {
2935 String ? host,
3036 int ? port,
3137 String ? nickname,
38+ String ? altNickname,
3239 String ? username,
3340 String ? realName,
3441 bool ? useTls,
3542 String ? password,
43+ String ? saslAccount,
44+ String ? saslPassword,
3645 bool ? autoConnect,
3746 }) {
3847 return NetworkConfig (
@@ -41,10 +50,13 @@ class NetworkConfig {
4150 host: host ?? this .host,
4251 port: port ?? this .port,
4352 nickname: nickname ?? this .nickname,
53+ altNickname: altNickname ?? this .altNickname,
4454 username: username ?? this .username,
4555 realName: realName ?? this .realName,
4656 useTls: useTls ?? this .useTls,
4757 password: password ?? this .password,
58+ saslAccount: saslAccount ?? this .saslAccount,
59+ saslPassword: saslPassword ?? this .saslPassword,
4860 autoConnect: autoConnect ?? this .autoConnect,
4961 );
5062 }
@@ -56,10 +68,13 @@ class NetworkConfig {
5668 'host' : host,
5769 'port' : port,
5870 'nickname' : nickname,
71+ 'altNickname' : altNickname,
5972 'username' : username,
6073 'realName' : realName,
6174 'useTls' : useTls,
6275 'password' : password,
76+ 'saslAccount' : saslAccount,
77+ 'saslPassword' : saslPassword,
6378 'autoConnect' : autoConnect,
6479 };
6580 }
@@ -71,10 +86,13 @@ class NetworkConfig {
7186 host: json['host' ]! as String ,
7287 port: (json['port' ]! as num ).toInt (),
7388 nickname: json['nickname' ]! as String ,
89+ altNickname: json['altNickname' ] as String ? ,
7490 username: (json['username' ] as String ? ) ?? 'androidircx' ,
7591 realName: (json['realName' ] as String ? ) ?? 'AndroidIRCX' ,
7692 useTls: (json['useTls' ] as bool ? ) ?? true ,
7793 password: json['password' ] as String ? ,
94+ saslAccount: json['saslAccount' ] as String ? ,
95+ saslPassword: json['saslPassword' ] as String ? ,
7896 autoConnect: (json['autoConnect' ] as bool ? ) ?? false ,
7997 );
8098 }
0 commit comments