ScreenInfo.fromJson constructor Null safety
Named constructor to create ScreenInfo from a Map.
Implementation
ScreenInfo.fromJson(Map<String, Object?> json)
: this(
screenToken: json['screenToken']! as String,
batteryPercentage: json['batteryPercentage']! as int,
lowBatteryThreshold: json['lowBatteryThreshold']! as int,
lowBatteryNotificationDelay:
json['lowBatteryNotificationDelay']! as int,
batteryReportingDelay: json['batteryReportingDelay']! as int,
isOnline: json['isOnline']! as bool,
);