ifFailure method
Implementation
void ifFailure(void Function(String message, Exception? exception) action) {
if (isFailure) {
final failure = _result as Failure;
final message = failure.message;
final exception = failure.exception;
action(message, exception);
}
}