toMap method

Map toMap()

Implementation

Map<dynamic, dynamic> toMap() {
  final Map<dynamic, dynamic> data = {};
  data['remote_id'] = remoteId.str;
  data['service_uuid'] = serviceUuid.str;
  data['secondary_service_uuid'] = secondaryServiceUuid?.str;
  data['characteristic_uuid'] = characteristicUuid.str;
  data['write_type'] = writeType.index;
  data['allow_long_write'] = allowLongWrite ? 1 : 0;
  data['value'] = _hexEncode(value);
  return data;
}