getIcxBalance method

Future<Balance> getIcxBalance (
  1. {String privateKey}
)

return current icx balance

final balance = await FlutterIconNetwork.instance.getIcxBalance(privateKey: yourPrivateKey);

Implementation

Future<Balance> getIcxBalance({String privateKey}) async {
  final String balance = await _channel.invokeMethod('getIcxBalance',
      {'private_key': privateKey, "host": host, "network_id": _networkId});
  print("FlutterIconNetwork getIcxBalance $balance");
  return balanceFromJson(balance);
}