Device.fromJson constructor

Device.fromJson(
  1. Map<String, Object?> json
)

Implementation

Device.fromJson(Map<String, Object?> json)
  : deviceId = json['device_id'] as String,
    displayName = ((v) =>
        v != null ? v as String : null)(json['display_name']),
    lastSeenIp = ((v) =>
        v != null ? v as String : null)(json['last_seen_ip']),
    lastSeenTs = ((v) => v != null ? v as int : null)(json['last_seen_ts']);