BleService.fromMap constructor
BleService.fromMap(
- Map map
Implementation
factory BleService.fromMap(Map<dynamic, dynamic> map) {
final List<dynamic> characteristics =
map[BleChannelKey.characteristics] as List<dynamic>? ??
const <dynamic>[];
return BleService(
remoteId: BleRemoteId(map[BleChannelKey.remoteId] as String? ?? ''),
primaryServiceUuid: map[BleChannelKey.primaryServiceUuid] as String?,
serviceUuid: map[BleChannelKey.serviceUuid] as String? ?? '',
characteristics: characteristics
.whereType<Map<String, dynamic>>()
.map(BleCharacteristic.fromMap)
.toList(growable: false),
);
}