onConnect method

void onConnect(
  1. void callback()
)
inherited

Set callback when the device is connected

Implementation

void onConnect(void Function() callback) {
  _setupTimers();
  onConnectCallback = callback;
}