aman-kassa-flutter/lib/core/models/bluetooth_device.dart

26 lines
497 B
Dart

class BluetoothDevice {
String? name;
String? address;
int? type;
bool? connected;
BluetoothDevice();
factory BluetoothDevice.fromJson(Map<String, dynamic> json) {
return BluetoothDevice()
..name = json['name']
..address = json['address']
..type = json['type']
..connected = json['connected'];
}
Map<String, dynamic> toJson() {
return {
'name': name,
'address': address,
'type': type,
'connected': connected,
};
}
}