onFailure abstract method

void onFailure(
  1. void callback(
    1. ErrorMessage errorMessage
    )
)

Calls the provided callback if the result is a failure.

callback is the function to be called with the error message if the result is a failure.

Implementation

void onFailure(void Function(ErrorMessage errorMessage) callback);