Fragment$MyDevice$plusDevice.fromJson constructor
Fragment$MyDevice$plusDevice.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Fragment$MyDevice$plusDevice.fromJson(Map<String, dynamic> json) {
final l$allTimesHighConsumption = json['allTimesHighConsumption'];
final l$allTimesHighProduction = json['allTimesHighProduction'];
final l$hasProduction = json['hasProduction'];
final l$blinksPerKwh = json['blinksPerKwh'];
final l$errorCode = json['errorCode'];
final l$rmsCurrentMaxPerPhaseAmpere = json['rmsCurrentMaxPerPhaseAmpere'];
final l$consumptionAlarmMaxWh = json['consumptionAlarmMaxWh'];
final l$deviceType = json['deviceType'];
final l$remoteDevices = json['remoteDevices'];
final l$baseDevice = json['baseDevice'];
final l$$__typename = json['__typename'];
return Fragment$MyDevice$plusDevice(
allTimesHighConsumption: (l$allTimesHighConsumption as num?)?.toDouble(),
allTimesHighProduction: (l$allTimesHighProduction as num?)?.toDouble(),
hasProduction: (l$hasProduction as bool?),
blinksPerKwh: (l$blinksPerKwh as int?),
errorCode: (l$errorCode as String?),
rmsCurrentMaxPerPhaseAmpere: (l$rmsCurrentMaxPerPhaseAmpere as num?)
?.toDouble(),
consumptionAlarmMaxWh: (l$consumptionAlarmMaxWh as int?),
deviceType: l$deviceType == null
? null
: Fragment$MyDevice$plusDevice$deviceType.fromJson(
(l$deviceType as Map<String, dynamic>),
),
remoteDevices: (l$remoteDevices as List<dynamic>?)
?.map(
(e) => Fragment$MyDevice$plusDevice$remoteDevices.fromJson(
(e as Map<String, dynamic>),
),
)
.toList(),
baseDevice: l$baseDevice == null
? null
: Fragment$MyDevice$plusDevice$baseDevice.fromJson(
(l$baseDevice as Map<String, dynamic>),
),
$__typename: (l$$__typename as String),
);
}