init static method

Future<void> init(
  1. ChainInfo chainInfo,
  2. Env env
)

{ "chain": "BscChain", "chain_id": "Testnet", "env": "PRODUCTION" }

Implementation

static Future<void> init(ChainInfo chainInfo, Env env) async {
  if (Platform.isIOS) {
    await _channel.invokeMethod(
        'initialize',
        jsonEncode({
          "chain_name": chainInfo.chainName,
          "chain_id_name": chainInfo.chainIdName,
          "chain_id": chainInfo.chainId,
          "env": env.name
        }));
  } else {
    await _channel.invokeMethod(
        'init',
        jsonEncode({
          "chain_name": chainInfo.chainName,
          "chain_id_name": chainInfo.chainIdName,
          "chain_id": chainInfo.chainId,
          "env": env.name
        }));
  }
}