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

motion_tab_bar のカバー
パッケージ詳細v2.0.4

motion_tab_bar

Flutterアプリ用のアニメーション付きボトムナビゲーションバー。アイコンがアニメーションで配置され、色はカスタマイズ可能。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
725
いいね数
261
Pub ポイント
140

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

flutter pub add motion_tab_bar

パッケージ概要

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

Motion Tab Bar は、Flutter用のアニメーション付き下部ナビゲーションバーで、スムーズなアイコン遷移とカスタマイズ可能な色を特徴としています。タブ切り替え時にダイナミックなアニメーションを提供し、ナビゲーションを視覚的に魅力的にします。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなど複数のプラットフォームをサポートしており、デバイス間で一貫したデザインを実現します。開発者は簡単なコマンドで簡単にアプリに統合できます。軽量な性質と柔軟なスタイルオプションにより、モダンでインタラクティブなUIに最適です。

用途

  • アニメーション付きアプリナビゲーション
  • モダンなモバイルおよびウェブインターフェース
  • カスタマイズ可能な下部ナビゲーション
  • 強化されたユーザー参加度
  • クロスプラットフォームアプリ
  • インタラクティブUIコンポーネント

主な機能

  • スムーズなアイコンアニメーション
  • カスタマイズ可能な色
  • クロスプラットフォーム対応
  • 簡単な統合
  • 軽量設計
  • 応答性の遷移

適している対象

  • アニメーションナビゲーションを探しているFlutter開発者
  • 視覚フィードバックを必要とするアプリ
  • デザイン重視のアプリケーション
  • マルチプラットフォームプロジェクト
  • UI/UXの向上努力
  • モバイルおよびウェブアプリ開発者

注意事項

  • 低スペックデバイスでのパフォーマンスに影響を与える可能性があります
  • 色とアニメーション以外のカスタマイズは限られている
  • すべてのターゲットプラットフォームで慎重なテストが必要です
  • ミニマリスティックなデザインには適していません
  • アニメーションは過剰に使用されると、ユーザーの注意を逸らす可能性があります
  • 完全な機能を実現するには、サードパーティの依存関係に依存しています

元の README

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

Motion Tab Bar compatible with Flutter 3 and RTL support

pub package likes popularity pub points

A beautiful animated widget for your Flutter apps

MotionTabBar Gif

Without Badge With Badge
MotionTabBar Gif MotionTabBar Gif

Getting Started

Add the plugin:

dependencies:
  motion_tab_bar: ^2.0.4

Basic Usage

Use default TabController or MotionTabBarController:
  // TabController _tabController;
  MotionTabBarController? _motionTabBarController;

  @override
  void initState() {
    super.initState();
    
    //// Use normal tab controller
    // _tabController = TabController(
    //   initialIndex: 1,
    //   length: 4,
    //   vsync: this,
    // );

    //// use "MotionTabBarController" to replace with "TabController", if you need to programmatically change the tab
    _motionTabBarController = MotionTabBarController(
      initialIndex: 1,
      length: 4,
      vsync: this,
    );
  }

  @override
  void dispose() {
    super.dispose();

    // _tabController.dispose();
    _motionTabBarController!.dispose();
  }
Add Motion Tab Bar to Scaffold bottomNavigationBar:
  bottomNavigationBar: MotionTabBar(
    controller: _motionTabBarController, // ADD THIS if you need to change your tab programmatically
    initialSelectedTab: "Home",
    labels: const ["Dashboard", "Home", "Profile", "Settings"],
    icons: const [Icons.dashboard, Icons.home, Icons.people_alt, Icons.settings],

    // optional badges, length must be same with labels
    badges: [
      // Default Motion Badge Widget
      const MotionBadgeWidget(
        text: '10+',
        textColor: Colors.white, // optional, default to Colors.white
        color: Colors.red, // optional, default to Colors.red
        size: 18, // optional, default to 18
      ),

      // custom badge Widget
      Container(
        color: Colors.black,
        padding: const EdgeInsets.all(2),
        child: const Text(
          '11',
          style: TextStyle(
            fontSize: 14,
            color: Colors.white,
          ),
        ),
      ),

      // allow null
      null,

      // Default Motion Badge Widget with indicator only
      const MotionBadgeWidget(
        isIndicator: true,
        color: Colors.blue, // optional, default to Colors.red
        size: 5, // optional, default to 5,
        show: true, // true / false
      ),
    ],
    tabSize: 50,
    tabBarHeight: 55,
    textStyle: const TextStyle(
      fontSize: 12,
      color: Colors.black,
      fontWeight: FontWeight.w500,
    ),
    tabIconColor: Colors.blue[600],
    tabIconSize: 28.0,
    tabIconSelectedSize: 26.0,
    tabSelectedColor: Colors.blue[900],
    tabIconSelectedColor: Colors.white,
    tabBarColor: Colors.white,
    onTabItemSelected: (int value) {
      setState(() {
        // _tabController!.index = value;
        _motionTabBarController!.index = value;
      });
    },
  ),
add TabBarView to Scaffold body
  body: TabBarView(
    physics: NeverScrollableScrollPhysics(), // swipe navigation handling is not supported
    // controller: _tabController,
    controller: _motionTabBarController,
    children: <Widget>[
      const Center(
        child: Text("Dashboard"),
      ),
      const Center(
        child: Text("Home"),
      ),
      const Center(
        child: Text("Profile"),
      ),
      const Center(
        child: Text("Settings"),
      ),
    ],
  ),
to change tabs programmatically
...

ElevatedButton(
  // set MotionTabBarController index to new tab index
  onPressed: () => _motionTabBarController.index = 0,
  child: const Text('Dashboard Page'),
),
ElevatedButton(
  // set MotionTabBarController index to new tab index
  onPressed: () => _motionTabBarController.index = 1,
  child: const Text('Home Page'),
),

...

Catch me up on LinkedIn @Rezaul Islam

💙 to Code👨🏽‍💻 Flutter Expert • Dart Kotlin Swift Node Js • Android • Full Stack Developer

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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

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