init method

  1. @override
Future<void> init()
override

Implementation

@override
Future<void> init() async {
  if (!isEnabled.value) {
    _initialized = Completer<bool>();
    _initialized.complete(false);
    _connected = Completer<bool>();
    _connected.complete(false);
    return;
  }
  _packageName = await WalletConnectUtils.getPackageName();
  await _init();
  await _initialized.future;
  await _isConnected();
  await _connected.future;
  isReady.value = true;
  _syncDappData();
  return;
}