remove useless function

This commit is contained in:
LollipopKit
2021-10-31 21:40:36 +08:00
parent 2eb6e19a86
commit 1943fde6eb
9 changed files with 46 additions and 71 deletions

View File

@@ -13,25 +13,27 @@ class ServerPrivateInfo {
}
*/
String? name;
String? ip;
int? port;
String? user;
Object? authorization;
late String name;
late String ip;
late int port;
late String user;
late Object authorization;
String? pubKeyId;
ServerPrivateInfo({
this.name,
this.ip,
this.port,
this.user,
this.authorization,
});
ServerPrivateInfo(
{required this.name,
required this.ip,
required this.port,
required this.user,
required this.authorization,
this.pubKeyId});
ServerPrivateInfo.fromJson(Map<String, dynamic> json) {
name = json["name"]?.toString();
ip = json["ip"]?.toString();
port = json["port"]?.toInt();
user = json["user"]?.toString();
name = json["name"].toString();
ip = json["ip"].toString();
port = json["port"].toInt();
user = json["user"].toString();
authorization = json["authorization"];
pubKeyId = json["pubKeyId"]?.toString();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
@@ -40,11 +42,12 @@ class ServerPrivateInfo {
data["port"] = port;
data["user"] = user;
data["authorization"] = authorization;
data["pubKeyId"] = pubKeyId;
return data;
}
}
List<ServerPrivateInfo>? getServerInfoList(dynamic data) {
List<ServerPrivateInfo> getServerInfoList(dynamic data) {
List<ServerPrivateInfo> ss = [];
if (data is String) {
data = json.decode(data);