mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
feat: custom net dev (#543)
This commit is contained in:
@@ -21,6 +21,14 @@ final class ServerCustom {
|
||||
@HiveField(5)
|
||||
final String? logoUrl;
|
||||
|
||||
/// The device name of the network interface displayed in the home server card.
|
||||
@HiveField(6)
|
||||
final String? netDev;
|
||||
|
||||
/// The directory where the script is stored.
|
||||
@HiveField(7)
|
||||
final String? scriptDir;
|
||||
|
||||
const ServerCustom({
|
||||
//this.temperature,
|
||||
this.pveAddr,
|
||||
@@ -28,6 +36,8 @@ final class ServerCustom {
|
||||
this.cmds,
|
||||
this.preferTempDev,
|
||||
this.logoUrl,
|
||||
this.netDev,
|
||||
this.scriptDir,
|
||||
});
|
||||
|
||||
factory ServerCustom.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -35,12 +45,6 @@ final class ServerCustom {
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServerCustomToJson(this);
|
||||
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return toJson().toString();
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is ServerCustom &&
|
||||
@@ -49,7 +53,9 @@ final class ServerCustom {
|
||||
other.pveIgnoreCert == pveIgnoreCert &&
|
||||
other.cmds == cmds &&
|
||||
other.preferTempDev == preferTempDev &&
|
||||
other.logoUrl == logoUrl;
|
||||
other.logoUrl == logoUrl &&
|
||||
other.netDev == netDev &&
|
||||
other.scriptDir == scriptDir;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -59,5 +65,7 @@ final class ServerCustom {
|
||||
pveIgnoreCert.hashCode ^
|
||||
cmds.hashCode ^
|
||||
preferTempDev.hashCode ^
|
||||
logoUrl.hashCode;
|
||||
logoUrl.hashCode ^
|
||||
netDev.hashCode ^
|
||||
scriptDir.hashCode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user