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

パッケージ詳細v2.0.4

page_view_indicator

任意の Widget および/または Animation から PageView のインジケータを構築します。

30日間ダウンロード
257
いいね数
31
Pub ポイント
35

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

flutter pub add page_view_indicator

パッケージ概要

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

PageView ウィジェット用のカスタマイズ可能なインジケーターマークを提供する Flutter パッケージで、開発者が任意の Widget やアニメーションを視覚的なインジケーターとして使用できます。スクロール可能なページリスト内の現在のページ位置を明確に示すことで、ユーザー体験を向上させます。軽量かつ柔軟で、カスタムスタイルやダイナミックなアニメーションをサポートしています。オンボーディングフロー、画像スライダー、ガイド付きツアーに最適です。

用途

  • オンボーディング画面
  • 画像スライダー
  • ガイド付きツアー
  • フォームウィザード
  • コンテンツカルーセル

主な機能

  • カスタマイズ可能なウィジェットインジケーター
  • アニメーションのサポート
  • 柔軟なスタイリング
  • PageView との簡単な統合
  • 軽量でパフォーマンスに優れる

適している対象

  • モバイルアプリのオンボーディング
  • 画像ギャラリー
  • インタラクティブなチュートリアル
  • 動的コンテンツが表示されます
  • ユーザーインターフェースの向上

注意事項

  • PageControllerを使用した手動設定が必要です
  • 限定されたプラットフォーム固有の最適化
  • 組み込みのアクセシビリティ機能なし
  • 複雑なデザインには追加のスタイリングが必要になる場合があります
  • 外部のアニメーションロジックに依存しています

元の README

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

PageViewIndicator Pub Package

Builds indication marks for PageView.

Import

import 'package:page_view_indicator/page_view_indicator.dart';

Usage

Default Material behavior
return PageViewIndicator(
  pageIndexNotifier: pageIndexNotifier,
  length: length,
  normalBuilder: (animationController, index) => Circle(
        size: 8.0,
        color: Colors.black87,
      ),
  highlightedBuilder: (animationController, index) => ScaleTransition(
        scale: CurvedAnimation(
          parent: animationController,
          curve: Curves.ease,
        ),
        child: Circle(
          size: 12.0,
          color: Colors.black45,
        ),
      ),
);

Example 1


Custom animations
return PageViewIndicator(
  pageIndexNotifier: pageIndexNotifier,
  length: length,
  normalBuilder: (animationController, index) => Circle(
        size: 8.0,
        color: Colors.black87,
      ),
  highlightedBuilder: (animationController, index) => ScaleTransition(
        scale: CurvedAnimation(
          parent: animationController,
          curve: Curves.ease,
        ),
        child: Circle(
          size: 8.0,
          color: Colors.white,
        ),
      ),
);

Example 2


Custom icons

It's not just about dots!

return PageViewIndicator(
  pageIndexNotifier: pageIndexNotifier,
  length: length,
  normalBuilder: (animationController, index) => ScaleTransition(
        scale: CurvedAnimation(
          parent: animationController,
          curve: Curves.ease,
        ),
        child: Icon(
          Icons.favorite,
          color: Colors.black87,
        ),
      ),
  highlightedBuilder: (animationController, index) => ScaleTransition(
        scale: CurvedAnimation(
          parent: animationController,
          curve: Curves.ease,
        ),
        child: Icon(
          Icons.star,
          color: Colors.white,
        ),
      ),
);

Example 3

Changing the space bettwen the indicators

You can change the padding around the indicators using the indicatorPadding property:

return PageViewIndicator(
  pageIndexNotifier: pageIndexNotifier,
  length: length,
  indicatorPadding: const EdgeInsets.all(4.0)
  ...

Default is const EdgeInsets.all(8.0).

カテゴリー

ソースリポジトリ

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