writeValue method

  1. @override
Future<void> writeValue(
  1. String deviceId,
  2. String service,
  3. String characteristic,
  4. Uint8List value,
  5. BleOutputProperty bleOutputProperty,
)
override

Implementation

@override
Future<void> writeValue(String deviceId, String service, String characteristic, Uint8List value, BleOutputProperty bleOutputProperty) async {
  _method.invokeMethod('writeValue', {
    'deviceId': deviceId,
    'service': service,
    'characteristic': characteristic,
    'value': value,
    'bleOutputProperty': bleOutputProperty.value,
  }).then((_) {
    _log('writeValue invokeMethod success', logLevel: Level.ALL);
  }).catchError((onError) {
    // Characteristic sometimes unavailable on Android
    throw onError;
  });
}