page 1.1.0 page: ^1.1.0 copied to clipboard
Data structure to help paginating (e.g. cursor- or next-token-driven) API calls.
import 'package:page/page.dart';
main() async {
final Page page = await null; // There goes a call to the database.
final iterator = page.asIterator();
// iterator will request the next page when needed
while (await iterator.moveNext()) {
print(iterator.current); // prints current item
}
}