Skip to content
pubscout

pagination_flutter

0.0.8, released 4 years ago by an unverified publisher

A modular pagination widget for Flutter with page indicators and navigation buttons.

WASM-ready
$ flutter pub add pagination_flutter
Source repository

What it does

Provides a ready‑made pagination component that displays a configurable number of page buttons, next/previous icons, and allows custom styling for active and inactive pages. It notifies the parent widget when the selected page changes.

AI-written summary of version 0.0.8, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a simple, customizable pagination UI in a Flutter app
  • You want to control page navigation manually via setState or a controller

Skip it when

  • You require infinite scrolling or server‑side paging logic
  • You need advanced features like lazy loading, page caching, or built‑in state management

Strengths

  • Easy to drop‑in and use
  • Highly customizable appearance via ButtonStyle and TextStyle
  • Works on all Flutter platforms

Weaknesses

  • Limited to static page counts; no built‑in data fetching
  • No integration with state‑management solutions
  • Lacks advanced paging features like ellipsis or dynamic range

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:flutter/material.dart';
import 'package:pagination_flutter/pagination_flutter.dart';

class MyHomePage extends StatefulWidget {const MyHomePage({Key? key}): super(key: key);}
class _MyHomePageState extends State<MyHomePage> {
  int selectedPage = 1;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Flutter Pagination')),
      body: Center(
        child: Pagination(
          numOfPages: 10,
          selectedPage: selectedPage,
          pagesVisible: 3,
          onPageChanged: (page) => setState(() => selectedPage = page),
          nextIcon: const Icon(Icons.arrow_forward_ios, color: Colors.blue, size: 14),
          previousIcon: const Icon(Icons.arrow_back_ios, color: Colors.blue, size: 14),
        ),
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace pagination_flutter.

  • dots_indicator

    A widely used, lightweight page indicator that can be combined with custom navigation logic