init method

Future<void> init(
  1. Keyring keyringStorage, {
  2. WebViewRunner? webViewParam,
  3. Function? onInitiated,
  4. String? jsCode,
  5. Function? socketDisconnectedAction,
})

Implementation

Future<void> init(
  Keyring keyringStorage, {
  WebViewRunner? webViewParam,
  Function? onInitiated,
  String? jsCode,
  Function? socketDisconnectedAction,
}) async {
  keyring = ServiceKeyring(this);
  setting = ServiceSetting(this);
  account = ServiceAccount(this);
  tx = ServiceTx(this);
  staking = ServiceStaking(this);
  gov = ServiceGov(this);
  gov2 = ServiceGov2(this);
  parachain = ServiceParachain(this);
  assets = ServiceAssets(this);
  bridge = ServiceBridge(this);
  uos = ServiceUOS(this);
  recovery = ServiceRecovery(this);

  walletConnect = ServiceWalletConnect(this);
  eth = ServiceEth(this);

  _web = webViewParam ?? WebViewRunner();
  await _web!.launch(onInitiated,
      jsCode: jsCode, socketDisconnectedAction: socketDisconnectedAction);
}