connect method Null safety

Future<bool> connect(
  1. [ResponseCallback<bool>? callback]
)

Connect to the Sonr Network

Establishes the Motor libp2p node, bootstraps the node to known DHT peers, and begins listening for incoming connections. An optional callback can be provided to be notified when the node is ready to accept connections. An optional callback can be provided to be notified when the node starts.

Next Steps

Implementation

Future<bool> connect([ResponseCallback<bool>? callback]) async {
  final resp = await MotorFlutterPlatform.instance.connect();
  callback?.call(resp);
  connected(resp);
  return resp;
}