map<R extends Object> method

  1. @override
Err<R> map<R extends Object>(
  1. @noFutures R noFutures(
    1. T value
    )
)
override

Transforms the contained value using the mapper function noFutures while preserving the Outcome's structure.

Throw behaviour

map absorbs throws into Err when the receiver's static type has somewhere to put one (any Result/Resolvable-shaped chain). On Option subtypes (Some, None) the return type does not include an Err variant, so a throwing callback escapes to the caller — use fold or transf for fallible Option transformations.

Implementation

@override
@pragma('vm:prefer-inline')
Err<R> map<R extends Object>(@noFutures R Function(T value) noFutures) {
  return transfErr();
}