搜尋套件、儲存庫與 APP 分類

dot_navigation_bar 封面
套件詳情v1.0.2

dot_navigation_bar

簡單的平滑動畫,提供美觀乾淨的 UI/UX 底部導航列。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1200
喜歡數
436
Pub 分數
150

安裝套件

flutter pub add dot_navigation_bar

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,提供簡潔、帶動畫效果的底端導航列,具備順暢的過渡效果與乾淨的使用者介面/體驗設計。它透過細膩的點狀指示器增強應用程式導航,提供傳統標籤欄的優雅替代方案。適用於希望在多個平台採用現代、極簡導航模式的應用。此套件支援所有主要平台,包含 Android、iOS、Web、macOS、Windows 與 Linux,確保一致的使用者體驗。僅需透過 pub add 進行最小設定,即可順暢整合至現有專案。

適用情境

  • 行動應用程式導航
  • Web 應用程式介面
  • 跨平台桌面應用
  • 極簡主義使用者介面設計
  • 透過動畫增強使用者體驗

主要特色

  • 流暢的動畫
  • 乾淨的點狀設計
  • 跨平台支援
  • 輕鬆整合
  • 可自定外觀
  • 響應式佈局

適合對象

  • 注重UI/UX的開發者
  • 具有簡單導航需求的應用程式
  • 需要輕量級組件的項目
  • 注重設計的應用程式
  • 跨平台 Flutter 應用

使用建議

  • 超出基本樣式的自訂功能有限
  • 可能不適合複雜的導航結構
  • 適用於擁有3–5個標籤頁的應用程式
  • 不太適合高度互動的導航欄
  • 需要仔細規劃色彩對比

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Dot Navigation Bar


undefined undefined
undefined undefined undefined undefined undefined
undefined undefined

A bottom navigation bar that you can customize with the options you need, without any limits. You can also customize the appearance of the navigation bar with simple smooth animations, providing a nice and clean UI/UX.

style1 Example flutter project


NEW


  • Round nav bar
  • Example file
  • Floating nav bar
  • shadow to Floating nav bar

Getting Started

To install, add it to your pubspec.yaml file:

dependencies:
    dot_navigation_bar:

import 'package:dot_navigation_bar/dot_navigation_bar.dart';

How to use it

call DotNavigationBar's constructor:

If you want to show body behind the navbar, it should be true

      extendBody: true,

if you are not intersted inmaking round nav bar with show body behind the navbar you have to make that

      extendBody: false,
Widget build(BuildContext context) {
  return Scaffold(
    body: Center(),
    extendBody: true,//<------like this 
    bottomNavigationBar:  DotNavigationBar(
          currentIndex: _SelectedTab.values.indexOf(_selectedTab),
          onTap: _handleIndexChanged,
          dotIndicatorColor: Colors.black,
          // enableFloatingNavBar: false
          items: [
            
            
          ],
        ),
  );
}

basic implementation

   Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: Image.asset("assets/IMG.png"),
      ),
      bottomNavigationBar:  DotNavigationBar(
          currentIndex: _SelectedTab.values.indexOf(_selectedTab),
          onTap: _handleIndexChanged,
          // dotIndicatorColor: Colors.black,
          items: [
            /// Home
            DotNavigationBarItem(
              icon: Icon(Icons.home),
              selectedColor: Colors.purple,
            ),

            /// Likes
            DotNavigationBarItem(
              icon: Icon(Icons.favorite_border),
              selectedColor: Colors.pink,
            ),

            /// Search
            DotNavigationBarItem(
              icon: Icon(Icons.search),
              selectedColor: Colors.orange,
            ),

            /// Profile
            DotNavigationBarItem(
              icon: Icon(Icons.person),
              selectedColor: Colors.teal,
            ),
            
          ],
        ),
    );
  }

The constructor has 18 attributes related to the Widget:

  • items: A list of tabs to display, ie Home, Profile,Cart, etc
  • currentIndex: The tab to display.
  • onTap:Returns the index of the tab that was tapped.
  • selectedItemColor:The color of the icon and text when the item is selected.
  • unselectedItemColor: The color of the icon and text when the item is not selected.
  • margin:A convenience field for the margin surrounding the entire widget.
  • itemPadding:The padding of each item.
  • duration: The transition duration.
  • curve: The transition curve.
  • dotIndicatorColor:The color of the Dot indicator.
  • marginR:margin for the bar to give some radius .
  • paddingR:padding for the bar to give some radius.
  • borderRadius:border radius for nav bar.
  • backgroundColor:bgd colors for the nav bar.
  • boxShadow: floating nav bar shadow ,it takes List of BoxShadow
  • enableFloatingNavBar: make Floating nav bar enabled.
  • enablePaddingAnimation: enable the animation on item during item change.
  • splashColor: Color of the item's Splash Color. To disable, use Colors.transparent.

default values

marginR = const EdgeInsets.symmetric(horizontal: 50, vertical: 20),

paddingR = const EdgeInsets.only(bottom: 5, top: 10),

borderRadius = 30,

backgroundColor = Colors.white, enableFloatingNavBar=true, enablePaddingAnimation=true

Contributors

@iamvivekkaushik @buraktabn @Zheng Xiangrui

所屬分類

原始碼儲存庫

使用此套件的專案