connect method Null safety
- [ResponseCallback<
bool> ? callback]
{@subCategory 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.
Next Steps
Implementation
Future<bool> connect([ResponseCallback<bool>? callback]) async {
final resp = await MotorFlutterPlatform.instance.connect();
callback?.call(resp);
connected(resp);
return resp;
}