page 1.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 65

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.

example/page_example.dart

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:


dependencies:
  page: ^1.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages 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';
  
Version Uploaded Documentation Archive
1.1.0 Dec 31, 2018 Go to the documentation of page 1.1.0 Download page 1.1.0 archive
1.0.0 Dec 14, 2018 Go to the documentation of page 1.0.0 Download page 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
30
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.10

Platforms

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.

Dependencies

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