map<R> method
Maps the type of the items to a different type. The same mapper function will be called on subsequent pages.
The implementation will call the fn
in sequence, eagerly.
Implementation
@override
Future<Page<R>> map<R>(FutureOr<R> Function(T item) fn) {
return mapItems((items) async {
final list = <R>[];
for (final item in items) {
list.add(await fn(item));
}
return list;
});
}