sendToken method

Future<SendIcxResponse> sendToken({
  1. String? yourPrivateKey,
  2. String? toAddress,
  3. String? scoreAddress,
  4. String? value,
})

value is num of icx, ex: 1 to send token to a address through SCORE

final response = await FlutterIconNetwork.instance.sendToken(
        yourPrivateKey: privateKey,
        toAddress: receiverAddress,
        value: numOfToken,
        scoreAddress: scoreAddress
       );

Implementation

Future<SendIcxResponse> sendToken(
    {String? yourPrivateKey,
    String? toAddress,
    String? scoreAddress,
    String? value}) async {
  final String response = await (_channel.invokeMethod('sendToken', {
    "from": yourPrivateKey,
    "to": toAddress,
    "score_address": scoreAddress,
    "value": value,
  }));
  print("FlutterIconNetwork sendToken $response");
  return sendIcxResponseFromJson(response);
}