handleEmpty method
void
handleEmpty({
- OnSuccessEmpty? onSuccess,
- OnError? onError,
- OnException? onException,
- OnFailure? onFailure,
Implementation
void handleEmpty({
OnSuccessEmpty? onSuccess,
OnError? onError,
OnException? onException,
OnFailure? onFailure,
}) {
if (success) {
onSuccess?.call(response);
} else if (error && (onError != null)) {
onError(response);
} else if (hasException && (onException != null)) {
onException(_exception);
} else {
onFailure?.call(response, _exception);
}
}