mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
new: option of ignoring pve cert (#317)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user