map<R> method
A result holding the bound value transformed by mapper. When
nothing was bound, mapper is not called and the result stays
unbound.
final port = binder
.bind('app.port', const ClassType<int>())
.map((port) => port + 1)
.orElse(8080);
Implementation
BindResult<R> map<R>(R Function(T value) mapper) => isBound
? BindResult<R>._(mapper(_value as T), isBound: true)
: BindResult<R>._(null, isBound: false);