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

GitHub リポジトリmu7mmd/stage_navigation_bar

stage_navigation_bar

mu7mmd/stage_navigation_bar open-source repository details.

stage_navigation_bar のプロジェクト画像
スター
2
フォーク
0
最終プッシュ(UTC)
2024/06/27
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

Static Badge Static Badge Static Badge

A beautiful navigation bar with animation when select item.

Top To Bottom

Table of contents

  1. Installing
  2. How To Use
  3. Showcase
  4. Example Project
  5. Contributors

🖥 Installing

Add Dependency
dependencies:
  stage_navigation_bar: ^0.1.0 #latest version
Import Package
import 'package:stage_navigation_bar/stage_navigation_bar.dart';

ℹ️ How To Use

Place your StageNavigationBar to the bottomNavigationBar slot of a Scaffold. Or in the bottom of your main page view.

Code
class StageNavigationBarExample extends StatefulWidget {
  const StageNavigationBarExample({super.key});

  @override
  State<StageNavigationBarExample> createState() =>
      _StageNavigationBarExampleState();
}

class _StageNavigationBarExampleState extends State<StageNavigationBarExample> {
  /// Your initial page
  int _selectedIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      bottomNavigationBar: StageNavigationBar(
        items: const [
          Icon(Icons.home_filled, color: Colors.white),
          Icon(Icons.favorite, color: Colors.white),
          Icon(Icons.search, color: Colors.white),
          Icon(Icons.person, color: Colors.white),
        ],
        selectedIndex: _selectedIndex,
        indicatorColor: Colors.amber,
        onTap: (int index) {
          setState(() {
            _selectedIndex = index;
          });
        },
      ),
    );
  }
}
Properties
  • animationDirection: Define the animation move shape when tap.
  • alignment: Alignment of the items.
  • barHeight: StageNavigationBar height.
  • barWidth: StageNavigationBar width.
  • indicatorHeight: Indicator line height.
  • itemPadding: Each item padding.
  • duration: Indicator animation Transition duration.
  • selectedIndex*: Current selected index.
  • indicatorColor*: Color of the indicator and the gradient.
  • onTap*: On item tap.
  • barPadding?: StageNavigationBar internal padding.
  • barMargin?: StageNavigationBar external padding.
  • decoration?: StageNavigationBar box decoration.
  • selectedIndicatorBorderRadius?: Selected item indicator border radius.
  • unselectedIndicatorBorderRadius?: Unselected item indicator border radius.
  • items!: StageNavigationBar items, List of widget.
  • itemsCount!: Items count for itemBuilder callback.
  • itemBuilder!: Callback will be called with indices greater than or equal to zero and less than itemsCount.
Default values
  • animationDirection = IndicatorAnimationDirection.topToBottom,
  • alignment = Alignment.center,
  • barHeight = 60,
  • barWidth = double.infinity
  • indicatorHeight = 5,
  • itemPadding = const EdgeInsets.all(0),
  • duration = const Duration(milliseconds: 200),
  • selectedIndicatorBorderRadius: default value depends on 'animationDirection' value,
  • unselectedIndicatorBorderRadius: default value depends on 'animationDirection' value,
IndicatorAnimationDirection Values
IndicatorAnimationDirection.top
IndicatorAnimationDirection.topToBottom
IndicatorAnimationDirection.centerToTop
IndicatorAnimationDirection.centerToBottom
IndicatorAnimationDirection.bottom
IndicatorAnimationDirection.bottomToTop
Event
onTap: (index){

}

🕹 Showcase

IndicatorAnimationDirection
animationDirection: IndicatorAnimationDirection.top

Top


animationDirection: IndicatorAnimationDirection.topToBottom

Top To Bottom


animationDirection: IndicatorAnimationDirection.centerToTop

Center To Top


animationDirection: IndicatorAnimationDirection.centerToBottom

Center To Bottom


animationDirection: IndicatorAnimationDirection.bottom

Bottom


animationDirection: IndicatorAnimationDirection.bottomToTop

Bottom To Top

📱 Example Project

Pub Example

Github Example Project

👨🏻‍💻 Contributors

Mohammad Alamoudi @mu7mmd

Mohammad Alamoudi GitHub avatar
GitHub 作者

Mohammad Alamoudi ↗

言語C++DartCMakeSwiftCHTMLKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 3 件

  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^3.0.0

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗