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

animated_button_bar のカバー
パッケージ詳細v1.0.0

animated_button_bar

選択された項目にアニメーションを備えた、非常にカスタマイズ可能なボタンバー。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
604
いいね数
82
Pub ポイント
150

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

flutter pub add animated_button_bar

パッケージ概要

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

Flutterで使用可能なカスタマイズ可能なボタンバーで、アイテムが選択されたときにスムーズなアニメーションを実現します。開発者がインタラクティブで視覚的に魅力的なナビゲーションバーを、ボタン間のアニメーション遷移とともに作成できるようにします。複数のプラットフォームをサポートし、色、形状、アニメーション期間など、幅広いスタイルオプションを提供します。直感的なタブ型ナビゲーションと動的なフィードバックが必要なアプリに最適です。

用途

  • インタラクティブなナビゲーションバー
  • タブインターフェース
  • アニメーション付きUIトランジション
  • カスタマイズ可能な下部ナビゲーション
  • 選択に関するユーザーのフィードバック
  • モバイルおよびWebアプリダッシュボード

主な機能

  • スムーズな選択アニメーション
  • 高度にカスタマイズ可能な外観
  • クロスプラットフォーム対応
  • 設定可能なアニメーション期間
  • 柔軟なレイアウトオプション
  • タップジェスチャーをサポートしています

適している対象

  • モダンなUIを構築するFlutter開発者
  • アニメーション付きナビゲーションを必要とするアプリ
  • ユーザー体験に焦点を当てたデザイナー
  • 複数のプラットフォームをターゲットにするプロジェクト
  • 再利用可能なコンポーネントを希望する開発者

注意事項

  • 多数のアイテムがあるとパフォーマンスに影響する可能性があります
  • アニメーション速度の正確な調整が必要です
  • 制限された組み込みテーマ
  • シンプルな静的ボタンには適していません
  • 正しい状態管理に依存しています
  • レスポンシブデザインパターンと併用するのが最適です

元の README

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

animated_button_bar

AnimatedButtonBar is a flutter library that allows you to create a row of buttons with an animation on selection.

Getting started

Add this to your app's pubspec.yaml file:

dependencies:  
  animated_button_bar: ^0.0.2

Usage

Then you have to import the package with:

import 'package:animated_button_bar/animated_button_bar.dart';  

And use an AnimatedBarButton like this:

  Column(  
          mainAxisAlignment: MainAxisAlignment.center,  
          children: [  
            //inverted selection button bar  
            AnimatedButtonBar(  
              radius: 8.0,  
              padding: const EdgeInsets.all(16.0),  
              invertedSelection: true,  
              children: [  
                ButtonBarEntry(onTap: () => print('First item tapped'), child: Text('Day')),  
                ButtonBarEntry(onTap: () => print('Second item tapped'), child: Text('Week')),  
                ButtonBarEntry(onTap: () => print('Third item tapped'), child: Text('Month')),  
                ButtonBarEntry(onTap: () => print('Fourth item tapped'), child: Text('Year'))  
              ],  
            ),  
            //You can populate it with different types of widgets like Icon  
            AnimatedButtonBar(  
              radius: 32.0,  
              padding: const EdgeInsets.all(16.0),  
              backgroundColor: Colors.blueGrey.shade800,  
              foregroundColor: Colors.blueGrey.shade300,  
              elevation: 24,  
              borderColor: Colors.white,  
              borderWidth: 2,  
              innerVerticalPadding: 16,  
              children: [  
                ButtonBarEntry(onTap: () => print('First item tapped'), child: Icon(Icons.person)),  
                ButtonBarEntry(onTap: () => print('Second item tapped'), child: Icon(Icons.people)),  
              ],  
            ),  
          ],  
        ),  

Result

parameters

parameter description default
animationDuration animation duration when tap const Duration(milliseconds: 200)
backgroundColor main color of the widget Theme.of(context).backgroundColor
borderColor color of the border null
borderWidth width of the border borderColor != null ? 1.0 : 0.0;
children A list of ButtonBarEntry to display required
curve the curve for the animation Curves.fastOutSlowIn
elevation double 0
foregroundColor color for the selection Theme.of(context).accentColor
invertedSelection bool false
radius double 0.0
verticalPadding double 8.0

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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