KeyLightInfo.fromJSON constructor
KeyLightInfo.fromJSON(
- dynamic json
Implementation
KeyLightInfo.fromJSON(dynamic json)
: assert(json is Map),
productName = json['productName'],
hardwareBoardType = json['hardwareBoardType'],
firmwareBuildNumber = json['firmwareBuildNumber'],
firmwareVersion = json['firmwareVersion'],
serialNumber = json['serialNumber'],
displayName = json['displayName'],
features = json['features'] is Iterable
? (json['features'] as Iterable)
.map((dynamic item) =>
item is String && item.isNotEmpty ? item : null)
.where((element) => element != null)
.cast()
: null,
wifi = json['wifi-info'] != null
? KeyLightInfoWifi._fromJSON(json['wifi-info'])
: null;