connect method Null safety
- [ResponseCallback<
bool> ? callback]
Description
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();
if (callback != null) {
callback(resp);
}
connected(resp);
return resp;
}