Skip to content

abhishekthakur0/auto_pagination

Repository files navigation

auto_pagination

A Flutter package that provides an auto pagination widget to help users create a view that creates pagination view automatically when there is no room left for widget.

Installation

Add auto_pagination as a dependency in your pubspec.yaml file:

dependencies:
  auto_pagination: ^1.0.0

Usage

  1. Import the package:
import 'package:auto_pagination/auto_pagination.dart';
  1. Wrap your list of items with the AutoPagination widget:
AutoPagination(
  items: [
    "random1",
    "random2",
    "random3",
    "random4",
    "random5",
    "random6",
    "random7",
    "random8",
    "random9",
    "random10",
    "random11",
    "random12",
    "random13",
    "random14",
  ].map((e) => SizedBox(height: 20, child: Text(e))).toList(),
),
  1. Customize the AutoPagination widget as needed using optional parameters:
AutoPagination(
  items: _items,
  itemGap:10,
),

Parameters

  • items: required list of [Widgets] to be displayed
  • itemGap: optional gap between items if not provided default to 10 px

Example

For a complete example, see the example app.

License

This package is licensed under the MIT License. See the LICENSE file for details.

About

A flutter package to create pagination automatically

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors