ConnectedBleDevice.fromMap constructor

ConnectedBleDevice.fromMap(
  1. Map map
)

Converts a Map to a ConnectedBleDevice object.

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

Implementation

factory ConnectedBleDevice.fromMap(Map<dynamic, dynamic> map) {
  return ConnectedBleDevice(
    name: map['name'] as String,
    address: map['identifier'] as String,
  );
}