new: option of ignoring pve cert (#317)

This commit is contained in:
lollipopkit
2024-03-23 12:16:46 +08:00
parent 6ed2e558cb
commit 96866565c4
17 changed files with 93 additions and 38 deletions

View File

@@ -8,18 +8,23 @@ final class ServerCustom {
final String? temperature;
@HiveField(1)
final String? pveAddr;
@HiveField(2)
final bool? pveIgnoreCert;
const ServerCustom({
this.temperature,
this.pveAddr,
this.pveIgnoreCert,
});
static ServerCustom fromJson(Map<String, dynamic> json) {
final temperature = json["temperature"] as String?;
final pveAddr = json["pveAddr"] as String?;
final pveIgnoreCert = json["pveIgnoreCert"] as bool?;
return ServerCustom(
temperature: temperature,
pveAddr: pveAddr,
pveIgnoreCert: pveIgnoreCert,
);
}
@@ -31,6 +36,9 @@ final class ServerCustom {
if (pveAddr != null) {
json["pveAddr"] = pveAddr;
}
if (pveIgnoreCert != null) {
json["pveIgnoreCert"] = pveIgnoreCert;
}
return json;
}
}