BleDevice.fromMap constructor

BleDevice.fromMap(
  1. Map map
)

Converts a Map to a BleDevice object.

The map, which contains information about the discovered Bluetooth device, comes from the plugin's method channel. Therefore, the type annotation is <dynamic, dynamic>.

Implementation

factory BleDevice.fromMap(Map<dynamic, dynamic> map) {
  return BleDevice(
    name: map['name'] as String?,
    address: map['address'] as String,
    rssi: map['rssi'] as int,
    manufacturerData: map['manufacturerData'] as String?,
  );
}