BluetoothDeviceModel.fromMap constructor

BluetoothDeviceModel.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory BluetoothDeviceModel.fromMap(Map<String, dynamic> map) {
  return BluetoothDeviceModel(
    name: map['name'] as String? ?? 'Unknown',
    // iOS emits 'identifier', Android emits 'mac' — support both
    identifier: (map['identifier'] ?? map['mac']) as String? ?? '',
  );
}