mapErrOr<F> method
Returns the contained error, if any, with map
applied to it, or defaultError
otherwise.
Examples
// prints "4"
print(const Ok<int, String>(2).mapErrOr((error) => '$error!', 'other'));
// prints "0"
print(const Err<int, String>('error').mapErrOr((error) => '$error!', 'other'));
Implementation
@override
@useResult
F mapErrOr<F>(F Function(E error) map, F defaultError) => defaultError;