65 lines
1.3 KiB
Dart
65 lines
1.3 KiB
Dart
|
|
|
|
class DeviceNetwork {
|
|
DeviceNetwork({
|
|
this.description,
|
|
this.errorCode,
|
|
this.data,
|
|
this.errorMsg,});
|
|
|
|
DeviceNetwork.fromJson(dynamic json) {
|
|
description = json['description'];
|
|
errorCode = json['errorCode'];
|
|
data = json['data'] != null ? DeviceNetworkInfo.fromJson(json['data']) : null;
|
|
errorMsg = json['errorMsg'];
|
|
}
|
|
String? description;
|
|
int? errorCode;
|
|
DeviceNetworkInfo? data;
|
|
String? errorMsg;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['description'] = description;
|
|
map['errorCode'] = errorCode;
|
|
if (data != null) {
|
|
map['data'] = data!.toJson();
|
|
}
|
|
map['errorMsg'] = errorMsg;
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class DeviceNetworkInfo {
|
|
DeviceNetworkInfo({
|
|
this.wifiName,
|
|
this.networkMac,
|
|
this.secretKey,
|
|
this.peerId,
|
|
});
|
|
|
|
DeviceNetworkInfo.fromJson(dynamic json) {
|
|
wifiName = json['wifiName'];
|
|
networkMac = json['networkMac'];
|
|
secretKey = json['secretKey'];
|
|
peerId = json['peerId'];
|
|
}
|
|
|
|
String? wifiName;
|
|
String? networkMac;
|
|
String? secretKey;
|
|
String? peerId;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['wifiName'] = wifiName;
|
|
map['networkMac'] = networkMac;
|
|
map['secretKey'] = secretKey;
|
|
map['peerId'] = peerId;
|
|
return map;
|
|
}
|
|
}
|