map<R> method
Maps the success value to a new value using the provided function
Implementation
ProgressDialogResult<R> map<R>(R Function(T value) fn) {
return switch (this) {
Success(:final value) => Success(fn(value)),
Failure(:final error, :final stackTrace) => Failure(error, stackTrace),
};
}