パッケージ、リポジトリ、アプリカテゴリを検索

pagination_flutter のカバー
パッケージ詳細v0.0.8

pagination_flutter

Flutter用のモジュール式ページネーションコンポーネント。ページインジケーターとページナビゲーションボタンを備えたページネーションコンポーネント - すべてのデバイスおよびプラットフォームで互換性があります。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
923
いいね数
35
Pub ポイント
145

パッケージをインストール

flutter pub add pagination_flutter

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flutter用のモジュール式ページネーションコンポーネントで、カスタマイズ可能なページインジケーターとナビゲーションボタンを提供します。Android、iOS、Web、macOS、Windows、Linuxなどすべてのプラットフォームでスムーズに動作するように設計されています。リストやカルーセル、またはデータが豊富なUIに最適な、洗練された応答性のあるインターフェースを提供します。手動および自動ページネーションをサポートし、スムーズなトランジションとアクセシビリティ機能も備えています。

用途

  • ページネーションされたリストの表示
  • 画像スライダーの作成
  • データ量の多いダッシュボードの構築
  • 無限スクロールインターフェースの実装
  • モバイルおよびウェブアプリのナビゲーションの向上

主な機能

  • クロスプラットフォーム互換性
  • カスタマイズ可能なページインジケーター
  • 組み込みナビゲーションボタン
  • レスポンシブデザイン
  • アクセシビリティ対応
  • モジュラーアーキテクチャ

適している対象

  • マルチプラットフォームアプリを開発する開発者
  • 一貫したページネーションUXを必要とするチーム
  • アクセシブルなUIコンポーネントを必要とするプロジェクト
  • 大規模なデータセットやコンテンツカルーセルを備えたアプリ
  • 再利用可能なコンポーネントに焦点を当てるフロントエンド開発者

注意事項

  • 既存のリストまたはスクロールビューとの統合が必要です
  • ビジュアルページネーションに限定;データ取得は対応していません
  • 動的コンテンツの読み込みには追加の論理が必要になる場合があります
  • 非常に高いページ数に対して最適化されていません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

pagination_flutter

Getting started

Installation
dependencies:
  pagination_flutter: ^0.0.8
import 'package:pagination_flutter/pagination_flutter.dart';

Preview

Usage

class _MyHomePageState extends State<MyHomePage> {
  int selectedPage = 1;

  setSelectedPage(int index) {
    setState(() {
      selectedPage = index;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Flutter Pagination"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            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,
              ),
              activeTextStyle: const TextStyle(
                color: Colors.white,
                fontSize: 14,
                fontWeight: FontWeight.w700,
              ),
              activeBtnStyle: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Colors.blue),
                shape: MaterialStateProperty.all(
                  RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(38),
                  ),
                ),
              ),
              inactiveBtnStyle: ButtonStyle(
                shape: MaterialStateProperty.all(RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(38),
                )),
              ),
              inactiveTextStyle: const TextStyle(
                fontSize: 14,
                fontWeight: FontWeight.w700,
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Additional information

Properties
Name Type Default Description
numOfPages int 0 Number of pages to be displayed
selectedPage int 0 The currently selected page
pagesVisible int 0 Number of pages to be visible
onPageChanged Function null Function to be called when a page is selected
nextIcon Widget null Widget to be displayed as the next icon
previousIcon Widget null Widget to be displayed as the previous icon
activeTextStyle TextStyle null TextStyle for the active page
activeBtnStyle ButtonStyle null ButtonStyle for the active page
inactiveBtnStyle ButtonStyle null ButtonStyle for the inactive pages
inactiveTextStyle TextStyle null TextStyle for the inactive pages
spacing double 0 Spacing between the pages

License

MIT

Author

Varun V

Issues

If you find any issues, please report them here

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。