init method

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

Implementation

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

  walletConnect = ServiceWalletConnect(this);

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