setOperationHandler static method

void setOperationHandler(
  1. MethodChannel channel,
  2. Future handler(
    1. MethodCall call
    )?
)

Changes the non-notification callback owner without interrupting characteristic streams.

Passing null releases the current operation handler, for example after a characteristic read completes.

Implementation

static void setOperationHandler(MethodChannel channel, Future<dynamic> Function(MethodCall call)? handler) {
  BleMethodChannelRouter.forChannel(channel)._operationHandler = handler;
}