sendIcx method
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,
}));
print("FlutterIconNetwork sendIcx $response");
return sendIcxResponseFromJson(response);
}