connect method Null safety
- [ResponseCallback<
bool> ? callback]
Connect to the device, and call the callback with the result.
Args:
callback (ResponseCallback
Implementation
Future<bool> connect([ResponseCallback<bool>? callback]) async {
final resp = await MotorFlutterPlatform.instance.connect();
if (callback != null) {
callback(resp);
}
connected.value = resp;
return resp;
}