page 1.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 75

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

The intended audience of this library is API implementations and backend clients, e.g. database drivers.

1.1.0 #

  • synchronizePages to synchronize/diff two pages (assuming the keys are sorted in ascending order).

1.0.0 #

  • Initial version.


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

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  page: ^1.1.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:page/page.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Nov 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:page/page.dart.

Health suggestions

Format lib/src/page_impl.dart.

Run dartfmt to format lib/src/page_impl.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test ^1.0.0