paging 0.0.9

  • Example
  • Installing
  • Versions
  • new73

paging #

A Flutter package for paginating a list view

pub package

Installation #

Add this to your package's pubspec.yaml file

  paging: ^

Usage #

First import paging.dart

  import 'package:paging/paging.dart';

Simple to use. You can pass a type as a parameter to the widget, by default dynamic is assumed.

There are two required parameters:

  • pageBuilder: requires a Future of List and gives you the current size of list
  • itemBuilder: requires a widget and gives you the item of type to be displayed
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Pagination List')),
      body: Pagination<String>(
        pageBuilder: (currentSize) => pageData(currentSize),
        itemBuilder: (index, item){
          return Container(
                    color: Colors.yellow,
                    height: 48,
                    child: Text(item),

Screenshots #

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.


  • Example added


  • Initial version


example #

Example for paging library

import 'package:flutter/material.dart';
import 'package:paging/paging.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
      home: MyHomePage(title: 'Paging Example'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  static const int _COUNT = 10;

  // mocking a network call
  Future<List<String>> pageData(int previousCount) async {
    await Future.delayed(Duration(seconds: 0, milliseconds: 2000));
    List<String> dummyList = List();
    if (previousCount < 30) {
      // stop loading after 30 items
      for (int i = previousCount; i < previousCount + _COUNT; i++) {
        dummyList.add('Item $i');
    return dummyList;

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title)),
      body: Pagination(
        pageBuilder: (currentListSize) => pageData(currentListSize),
        itemBuilder: (item) => ListTile(title: Text(item)),

Use this package as a library

1. Depend on it

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

  paging: ^0.0.9

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support 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:paging/paging.dart';
Version Uploaded Documentation Archive
0.0.9 Feb 7, 2019 Go to the documentation of paging 0.0.9 Download paging 0.0.9 archive
0.0.8 Feb 7, 2019 Go to the documentation of paging 0.0.8 Download paging 0.0.8 archive
0.0.7 Feb 2, 2019 Go to the documentation of paging 0.0.7 Download paging 0.0.7 archive
0.0.6 Jan 25, 2019 Go to the documentation of paging 0.0.6 Download paging 0.0.6 archive
0.0.5 Jan 23, 2019 Go to the documentation of paging 0.0.5 Download paging 0.0.5 archive
0.0.4 Jan 23, 2019 Go to the documentation of paging 0.0.4 Download paging 0.0.4 archive
0.0.3 Jan 23, 2019 Go to the documentation of paging 0.0.3 Download paging 0.0.3 archive
0.0.2 Jan 20, 2019 Go to the documentation of paging 0.0.2 Download paging 0.0.2 archive
0.0.1 Jan 20, 2019 Go to the documentation of paging 0.0.1 Download paging 0.0.1 archive
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 Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13
  • Flutter: 1.2.0


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/paging.dart. (-0.50 points)

Analysis of lib/paging.dart reported 1 hint:

line 9 col 32: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies