Search packages, repositories and app categories

Package detailsv5.1.1

infinite_scroll_pagination

Lazily load and display pages of items as the user scrolls down your screen.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
481K
Likes
4.1K
Pub points
150

Install package

flutter pub add infinite_scroll_pagination

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that enables lazy loading of paginated content as users scroll, improving performance and user experience by fetching data incrementally. It seamlessly integrates with ListView and other scrollable widgets, automatically triggering page requests when nearing the end of the current content. Ideal for apps displaying long lists such as social feeds, search results, or product catalogs. The package handles loading states, error recovery, and empty states with minimal boilerplate.

Use cases

  • Social media feed scrolling
  • Search result pagination
  • E-commerce product listing
  • Long-form article display
  • Infinite content loading in dashboards

Key features

  • Automatic page loading on scroll
  • Built-in loading and error states
  • Support for multiple scrollable widgets
  • Customizable page request logic
  • Efficient memory usage through lazy loading

Suitable for

  • Apps with large datasets
  • Scrollable list interfaces
  • Performance-sensitive UIs
  • Developers seeking minimal setup
  • Projects requiring smooth infinite scrolling

Considerations

  • Requires proper handling of async data sources
  • May need custom caching strategies
  • Not ideal for small static lists
  • Depends on correct implementation of page token or offset logic
  • Potential for over-fetching if not configured carefully

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Package Logo with Flutter Favorite Badge

Chosen as a Flutter Favorite by the Flutter Ecosystem Committee

Pub.dev Badge GitHub Build Badge Code Coverage Badge Gitter Badge Effective Dart Badge MIT License Badge Flutter Platform Badge


Infinite Scroll Pagination

Unopinionated, extensible and highly customizable package to help you lazily load and display small chunks of items as the user scrolls down the screen – known as infinite scrolling pagination, endless scrolling pagination, auto-pagination, lazy loading pagination, progressive loading pagination, etc.

Designed to feel like part of the Flutter framework.

Example Project

Tutorial

By raywenderlich.com (step-by-step, hands-on, in-depth, and illustrated).

Usage

class ListViewScreen extends StatefulWidget {
  const ListViewScreen({super.key});

  @override
  State<ListViewScreen> createState() => _ListViewScreenState();
}

class _ListViewScreenState extends State<ListViewScreen> {
  late final _pagingController = PagingController<int, Photo>(
    getNextPageKey: (state) => state.lastPageIsEmpty ? null : state.nextIntPageKey,
    fetchPage: (pageKey) => RemoteApi.getPhotos(pageKey),
  );

  @override
  void dispose() {
    _pagingController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) => PagingListener(
    controller: _pagingController,
    builder: (context, state, fetchNextPage) => PagedListView<int, Photo>(
      state: state,
      fetchNextPage: fetchNextPage,
      builderDelegate: PagedChildBuilderDelegate(
        itemBuilder: (context, item, index) => ImageListTile(item: item),
      ),
    ),
  );
}

For more usage examples, please take a look at our cookbook or check out the example project.

Features

Migration

if you are upgrading the package, please check the migration guide for instructions on how to update your code.

API Overview

API Diagram

Categories

Dependencies

Dependency list 4 items

Source repository

Projects using this package

Rankings