auto_pagination 1.0.0 copy "auto_pagination: ^1.0.0" to clipboard
auto_pagination: ^1.0.0 copied to clipboard

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.

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.

1
likes
160
pub points
0%
popularity

Publisher

unverified uploader

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.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on auto_pagination