triggerCallbacks method

dynamic triggerCallbacks(
  1. TransactionStatusResponseCallback? callback, {
  2. dynamic onFailure(
    1. dynamic
    )?,
  3. dynamic onResponseJSON(
    1. Map
    )?,
})

Implementation

triggerCallbacks(TransactionStatusResponseCallback? callback, {Function(dynamic)? onFailure, Function(Map)? onResponseJSON}){
  if(success != null) {
    callback?.success(success!);
  }

  if(error != null) {
    callback?.error(error!);
  }

  if(failure != null && onFailure != null) {
    onFailure(failure);
  }

  if(responseJSON != null && onResponseJSON != null) {
    onResponseJSON(responseJSON ?? {});
  }
}