initiateTransactioniOS method

Future<String> initiateTransactioniOS(
  1. String? url
)

Initiates a UPI transaction on iOS with the provided URL.

Parameters:

  • url: The URL for initiating the UPI transaction on iOS.

Returns: A Future that completes with the result of the transaction initiation.

Implementation

Future<String> initiateTransactioniOS(String? url) async {
  try {
    final result = await _channel.invokeMethod(
      'initiateTransaction',
      {
        'uri': url,
      },
    );
    return result == true
        ? "Successfully Launched App!"
        : "Please install app!";
  } catch (error) {
    throw Exception(error);
  }
}