BatteryThresholds.fromMap constructor
- JsonMap map
Creates from a map.
Implementation
factory BatteryThresholds.fromMap(JsonMap map) {
return BatteryThresholds(
lowThreshold: (map['lowThreshold'] as num?)?.toInt() ?? 20,
criticalThreshold: (map['criticalThreshold'] as num?)?.toInt() ?? 10,
);
}