startNotifications method

Future<void> startNotifications()

Request the device to send notifications each time the value changes.

The new value will be notified using the oncharacteristicvaluechanged event. You may need to use JSArrayBufferToByteBuffer.toDart to get useful data.

  • May throw NotSupportedError if the operation is not allowed. Check properties to see if it is supported.

  • May throw SecurityError if the characteristic is blocked form notifying using a blocklist.

  • May throw NetworkError if the GATT server is not connected.

  • May throw InvalidStateError if characteristic is null

See:

Implementation

Future<void> startNotifications() async {
  await _startNotifications().toDart;
}