All Projects → joshmatta → Paging_library

joshmatta / Paging_library

Licence: mit
A Flutter package for paginating a list view

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Paging library

FlutterNote
Easy to learn Flutter(Flutter 即学即用,Flutter 速成必备)
Stars: ✭ 22 (-37.14%)
Mutual labels:  widget, listview
SwiftListView
Instagram style - Collection of simple & neutral list views for Swift
Stars: ✭ 17 (-51.43%)
Mutual labels:  widget, listview
Flutter graphite
Flutter widget to draw interactive direct graphs (flowcharts) of any complexity in a tile rectangular manner.
Stars: ✭ 23 (-34.29%)
Mutual labels:  widget
List view item builder
Flutter package: Item builder for ListView,to quickly build header & item & footer,and provide jumpTo(index) function.
Stars: ✭ 31 (-11.43%)
Mutual labels:  listview
Mumble Widget
🔋 A web-based channel viewer widget to display active users on your Mumble server.
Stars: ✭ 14 (-60%)
Mutual labels:  widget
Essa
Embeddable SCADA for Small Applications
Stars: ✭ 7 (-80%)
Mutual labels:  widget
Llmlistview
super list view for uwp
Stars: ✭ 27 (-22.86%)
Mutual labels:  listview
Moon Phase Widget
Moon phase widget for website in javascript
Stars: ✭ 19 (-45.71%)
Mutual labels:  widget
Listbuddies
Android library to achieve in an easy way, the behaviour of the home page in the Expedia app, with a pair of auto-scroll circular parallax ListViews.
Stars: ✭ 971 (+2674.29%)
Mutual labels:  listview
React Chat Widget
Awesome chat widget for your React App
Stars: ✭ 881 (+2417.14%)
Mutual labels:  widget
Awesome Pulseaudio widget
PulseAudio widgtet for the Awesome Window Manager that uses DBus
Stars: ✭ 29 (-17.14%)
Mutual labels:  widget
Clusterize.js
Tiny vanilla JS plugin to display large data sets easily
Stars: ✭ 6,995 (+19885.71%)
Mutual labels:  listview
Dynamic widget
A Backend-Driven UI toolkit, build your dynamic UI with json, and the json format is very similar with flutter widget code.
Stars: ✭ 851 (+2331.43%)
Mutual labels:  widget
Badge
Drawable of badge.
Stars: ✭ 943 (+2594.29%)
Mutual labels:  widget
Nativescript Masked Text Field
#️⃣ A NativeScript Masked Text Field widget
Stars: ✭ 24 (-31.43%)
Mutual labels:  widget
Flutter Unity View Widget
Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
Stars: ✭ 961 (+2645.71%)
Mutual labels:  widget
Jquery Datetextentry
jQuery plugin providing a widget for date entry (not a date picker)
Stars: ✭ 19 (-45.71%)
Mutual labels:  widget
Tkswitchercollection
An animation switch collection
Stars: ✭ 877 (+2405.71%)
Mutual labels:  widget
React Natives App
App for the React & React Native developer community as a demo project for the React Native meetups in Germany
Stars: ✭ 20 (-42.86%)
Mutual labels:  listview
React Native Super Grid
Responsive Grid View for React Native
Stars: ✭ 971 (+2674.29%)
Mutual labels:  listview

paging

A Flutter package for paginating a list view

pub package

Installation

Add this to your package's pubspec.yaml file

dependencies:
  ...
  paging: ^latest.version.here

Usage

First import paging.dart

  import 'package:paging/paging.dart';

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

There are two required parameters:

  • pageBuilder: requires a Future of List<T> and gives you the current size of list
  • itemBuilder: requires a widget and gives you the item of type <T> to be displayed
  // 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;
  }

  @override
  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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].