executeApiCall method
Method to execute an API action.
params:
action
: A function that performs the API call and returns aFuture<QueryResult<Object?>?>
.onValidResult
: A function to handle the result when the API call is successful.onActionException
: A function to handle exceptions that occur during the API call.onActionFinally
: A function to execute regardless of the success or failure of the API call.
returns:
Future<bool?>
: that indicates the success (true
), failure (false
), or null if the result is invalid.
Implementation
Future<bool?> async
- talawa
- user_action_handler
- ActionHandlerService
- executeApiCall method