init method

  1. @override
Future<bool> init()
inherited

Initializes the connection to the device.

Implementation

@override
Future<bool> init() async {
  await super.init();
  _subscription = stream.listen(_onPacket);
  _heartbeatTimer = Timer.periodic(heartbeatInterval, (_) => checkHeartbeats());
  return true;
}