material_pagination 1.0.1 copy "material_pagination: ^1.0.1" to clipboard
material_pagination: ^1.0.1 copied to clipboard

MaterialPagination is a versatile Flutter widget for pagination, offering customizable page buttons and navigation arrows, perfect for enhancing user navigation.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:material_pagination/material_pagination.dart';

void main() {
  runApp(MainApp());
}

class MainApp extends StatelessWidget {
  MainApp({super.key});
  int page = 6;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: StatefulBuilder(builder: (context, reload) {
          return Column(
            children: [
              const SizedBox(height: 20),
              MaterialPagination(
                currentPage: page,
                totalPages: 40,
                onPageChanged: (p0) {
                  reload(
                    () {
                      page = p0;
                    },
                  );
                },
                visiblePageCount: 3,
                activeColor: Colors.pink,
              ),
              const SizedBox(height: 20),
              MaterialPagination(
                currentPage: page,
                totalPages: 40,
                onPageChanged: (p0) {
                   reload(
                    () {
                      page = p0;
                    },
                  );
                },
                visiblePageCount: 3,
                activeColor: Colors.blue,
                inactiveColor: Colors.grey,
                borderRadius: 60,
              ),
              const SizedBox(height: 20),
              MaterialPagination(
                currentPage: page,
                totalPages: 40,
                onPageChanged: (p0) {
                   reload(
                    () {
                      page = p0;
                    },
                  );
                },
                iconGap: 10,
                visiblePageCount:5,
                activeColor: Colors.yellow,
                inactiveColor: Colors.grey,
                borderRadius: 3,
              ),
              const SizedBox(height: 20),
               MaterialPagination(
                currentPage: page,
                totalPages: 40,
                onPageChanged: (p0) {
                   reload(
                    () {
                      page = p0;
                    },
                  );
                },
                visiblePageCount: 3,
                buttonSize: 40,
                iconSize: 25,
                colorDarkness: 0,
                iconGap: 10,
                fontStyle: const TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.bold,
                ),


                activeColor: Colors.teal,
                inactiveColor: Colors.grey,
                borderRadius: 6,
              ),
              const SizedBox(height: 20),
            ],
          );
        }),
      ),
    );
  }
}
11
likes
150
points
52
downloads
screenshot

Publisher

verified publishershyamjith.in

Weekly Downloads

MaterialPagination is a versatile Flutter widget for pagination, offering customizable page buttons and navigation arrows, perfect for enhancing user navigation.

Homepage
Repository (GitHub)
View/report issues

Topics

#material #pagination #page

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on material_pagination