42 lines
1.4 KiB
Dart
42 lines
1.4 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'bluetooth_device_model.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_BluetoothDeviceModel _$BluetoothDeviceModelFromJson(
|
|
Map<String, dynamic> json) =>
|
|
_BluetoothDeviceModel(
|
|
id: json['id'] as String,
|
|
name: json['name'] as String?,
|
|
address: json['address'] as String,
|
|
rssi: (json['rssi'] as num?)?.toInt(),
|
|
type: $enumDecodeNullable(_$DeviceTypeEnumMap, json['type']) ??
|
|
DeviceType.other,
|
|
isConnected: json['isConnected'] as bool? ?? false,
|
|
manufacturerData: json['manufacturerData'] as Map<String, dynamic>?,
|
|
serviceUuids: (json['serviceUuids'] as List<dynamic>?)
|
|
?.map((e) => e as String)
|
|
.toList(),
|
|
);
|
|
|
|
Map<String, dynamic> _$BluetoothDeviceModelToJson(
|
|
_BluetoothDeviceModel instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'name': instance.name,
|
|
'address': instance.address,
|
|
'rssi': instance.rssi,
|
|
'type': _$DeviceTypeEnumMap[instance.type]!,
|
|
'isConnected': instance.isConnected,
|
|
'manufacturerData': instance.manufacturerData,
|
|
'serviceUuids': instance.serviceUuids,
|
|
};
|
|
|
|
const _$DeviceTypeEnumMap = {
|
|
DeviceType.universalShifters: 'universalShifters',
|
|
DeviceType.other: 'other',
|
|
};
|