BmDiscoverServicesResult.fromMap constructor

BmDiscoverServicesResult.fromMap(
  1. Map json
)

Implementation

factory BmDiscoverServicesResult.fromMap(Map<dynamic, dynamic> json) {
  return BmDiscoverServicesResult(
    remoteId: DeviceIdentifier(json['remote_id']),
    services: (json['services'] as List<dynamic>)
        .map((e) => BmBluetoothService.fromMap(e as Map<dynamic, dynamic>))
        .toList(),
    success: json['success'] != 0,
    errorCode: json['error_code'],
    errorString: json['error_string'],
  );
}