mapValue<TR> method
map the value of query.
If it is a SucceededResult, map its value with mapper
.
Otherwise, keep the result.
Implementation
QueryResult<TR> mapValue<TR>(ValueMapper<T, TR> mapper) =>
map<QueryResult<TR>>(
succeeded: (r) => QueryResult(mapper(r.value)),
failed: (r) => QueryResult<TR>.failed(r.error, r.stackTrace),
);