page 1.2.1 copy "page: ^1.2.1" to clipboard
page: ^1.2.1 copied to clipboard

Data structure to help paginating (e.g. cursor- or next-token-driven) API calls.

example/page_example.dart

import 'package:page/page.dart';

Future<void> main() async {
  final page = await _page(); // 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
  }
}

Future<Page> _page() async => Page.empty();
1
likes
140
pub points
44%
popularity

Publisher

verified publisheragilord.com

Data structure to help paginating (e.g. cursor- or next-token-driven) API calls.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

More

Packages that depend on page