getOrElse method
Implementation
Success getOrElse(Success Function(Failure) onFailure) {
if (isSuccess) {
return getOrThrow();
} else {
return onFailure(exceptionOrNull()!);
}
}
Success getOrElse(Success Function(Failure) onFailure) {
if (isSuccess) {
return getOrThrow();
} else {
return onFailure(exceptionOrNull()!);
}
}