sendIcx method

Future<SendIcxResponse> sendIcx (
  1. {String yourPrivateKey,
  2. String destinationAddress,
  3. String value}
)

value is decimal, ex: '1' send Icx to an address return the transaction hash

final txHash = await FlutterIconNetwork.instance.sendIcx(
                        yourPrivateKey: yourPrivateKey,
                        destinationAddress: address,
                        value: 1
                     )

Implementation

Future<SendIcxResponse> sendIcx(
    {String yourPrivateKey, String destinationAddress, String value}) async {
  final String response = await _channel.invokeMethod('sendIcx', {
    "from": yourPrivateKey,
    "to": destinationAddress,
    "value": value,
    "host": host,
    "network_id": _networkId
  });
  print("FlutterIconNetwork sendIcx $response");
  return sendIcxResponseFromJson(response);
}