requestTransactionWithActions method

Future<void> requestTransactionWithActions(
  1. List<FCXAction> actions
)

Request a transaction containing the specified actions to be performed by the in-app provider.

A error indicates that the requested transaction could not be executed.

Possible errors listed in the FCXCallKitRequestTransactionError.

Implementation

Future<void> requestTransactionWithActions(List<FCXAction> actions) async {
  try {
    String method = 'requestTransactionWithActions';
    await _methodChannel.invokeMethod(
      '$_CALL_CONTROLLER.$method',
      actions.map((f) => f._toMap()).toList(),
    );
    _FCXLog._i(runtimeType, '$method: $actions');
  } on PlatformException catch (e) {
    var exception = FCXException(e.code, e.message);
    _FCXLog._e(runtimeType, exception);
    throw exception;
  }
}