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

animated_icon_button のカバー
パッケージ詳細v1.0.2

animated_icon_button

カスタムアニメーション付き IconButton を作成するための Flutter パッケージ。すべての利用可能なアイコンを含む。ネイティブな IconButton をベースにしています。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1.7万
いいね数
295
Pub ポイント
160

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

flutter pub add animated_icon_button

パッケージ概要

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

ネイティブな IconButton をスムーズでカスタマイズ可能なアニメーションで強化する Flutter パッケージです。すべての利用可能なアイコンをサポートし、最小限のコードで視覚的に魅力的なボタンインタラクションを作成できます。Flutter のネイティブ IconButton をベースに構築されており、互換性を保ちつつ、スケーリング、回転、色のトランジションなどのダイナミックな効果を追加しています。ユーザーのフィードバックと視覚的魅力が重要な現代的な UI に最適です。

用途

  • インタラクティブなアプリボタンの作成
  • フォーム内のユーザーのフィードバックを強化する
  • ダッシュボードにマイクロインタラクションを追加する
  • アニメーションナビゲーション要素の設計
  • 視覚的サインを通じたアクセシビリティの向上
  • 魅力的なオンボーディング画面の作成

主な機能

  • 事前に構築されたアニメーションプリセット
  • すべてのFlutterアイコンをサポート
  • カスタマイズ可能なアニメーションの期間とカーブ
  • 既存コードとの簡単な統合
  • 軽量でパフォーマンスに優れる
  • クロスプラットフォーム互換性

適している対象

  • 動的なコンポーネントを探しているUI/UXデザイナー
  • インタラクティブなアプリを開発する開発者
  • 繊細で効果的なアニメーションを必要とするプロジェクト
  • ユーザー参加を重視したアプリ
  • マルチプラットフォーム展開にFlutterを使用するチーム

注意事項

  • バンドルサイズがわずかに増加する可能性があります
  • パフォーマンスを考慮して、アニメーションは控えめに使用するべきです
  • 高頻度のボタン押下には適していません
  • Flutter のアニメーションシステムの理解が必要です
  • アクセシビリティのために、意味のあるボタンラベルと組み合わせるのが最適です

元の README

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

animated_icon_button

😊 Flutter package to create custom animated IconButton.

😵 Includes all available icons. Based on native IconButton.


Breaking Change

After 1.0.2 version you can use multiple icons.

Getting Started

Follow these steps to use this library

Add dependency
dependencies:
  animated_icon_button: ^1.0.2 #latest version
Add import package
import 'package:animated_icon_button/animated_icon_button.dart';
Easy to use

Simple example of use AnimatedIconButton
Put this code in your project at an screen and wait for magic 😊

    AnimatedIconButton(
        onPressed: () => print('all icons pressed'),
        icons: [
            AnimatedIconButtonEntry(
                icon: Icon(Icons.add),
                onPressed: () => print('add pressed'),
            ),
            AnimatedIconButtonEntry(
                icon: Icon(Icons.close),
            ),
        ],
    ),
More icons

Now you can use more than 2 icons Add new icons to your list and they will change one by one

    AnimatedIconButton(
        size: 35,
        onPressed: () {
            print('all icons pressed');
        },
        duration: const Duration(milliseconds: 200),
        icons: <AnimatedIconButtonEntry>[
            AnimatedIconButtonEntry(
                icon: Icon(
                    Icons.mic,
                    color: Colors.purple,
                ),
                onPressed: () => print('mic pressed'),
                backgroundColor: Colors.white,
            ),
            AnimatedIconButtonEntry(
                icon: Icon(
                    Icons.g_translate,
                    color: Colors.purple,
                ),
                backgroundColor: Colors.white,
            ),
            AnimatedIconButtonEntry(
                icon: Icon(
                    Icons.collections_sharp,
                    color: Colors.purple,
                ),
                backgroundColor: Colors.white,
            ),
        ],
    ),
Custom animation controller

In order to animate your icons in a custom way, like on text changed or when pressing a button, just use the animationController property as follows.

    var animationController = AnimationController(
        vsync: this,
        duration: Duration(milliseconds: 200),
        reverseDuration: Duration(milliseconds: 200),
    );

    AnimatedIconButton(
        animationController: animationController,
        size: 35,
        onPressed: () {
            print('all icons pressed');
        },
        duration: const Duration(milliseconds: 200),
        icons: <AnimatedIconButtonEntry>[
            AnimatedIconButtonEntry(
                icon: Icon(
                    Icons.mic,
                    color: Colors.purple,
                ),
                onPressed: () => print('mic pressed'),
                backgroundColor: Colors.white,
            ),
            AnimatedIconButtonEntry(
                icon: Icon(
                    Icons.g_translate,
                    color: Colors.purple,
                ),
                backgroundColor: Colors.white,
            ),
            AnimatedIconButtonEntry(
                icon: Icon(
                    Icons.collections_sharp,
                    color: Colors.purple,
                ),
                backgroundColor: Colors.white,
            ),
        ],
    ),

Then, whenever you want, execute your animationController.forward() and animationController.reverse() methods to get your icons animated.

Don't forget when you use this property duration is not used, so it can be emitted.

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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