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

crystal_navigation_bar 封面
套件詳情v2.0.0

crystal_navigation_bar

簡潔、晶瑩剔透的模糊底部導航欄,帶有動態指示器,實現無縫應用導航。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2520
喜歡數
137
Pub 分數
160

安裝套件

flutter pub add crystal_navigation_bar

套件介紹

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

Crystal Navigation Bar 是一個視覺效果出色的 Flutter 應用底部導航欄,具備簡潔流暢的水晶般清晰模糊效果與動態指示器,可提升使用者體驗。專為跨平台應用導航設計,提供平滑動畫與現代美學。該套件支援 Android、iOS、Web、macOS、Windows 與 Linux,非常適合跨平台開發。透過 `flutter pub add` 即可輕鬆設定,無縫整合至現有專案中。其對視覺清晰度與流暢過渡的重視,使其成為注重設計與可用性的應用的理想選擇。

適用情境

  • 跨平台移動和網頁應用
  • 具有模糊效果的現代UI設計
  • 需要直覺式底部導航的應用
  • 高階使用者介面
  • 基於動態指標的導航

主要特色

  • 清晰的模糊效果
  • 動態指示器動畫
  • 跨平台相容性
  • Minimal setup with pub add
  • 平滑過渡動畫
  • 可自定外觀

適合對象

  • 注重設計的Flutter開發者
  • 具有高階UI/UX需求的應用程式
  • 面向多個平台的開發者
  • 注重視覺精煉的項目
  • 尋求現代導航模式的使用者

使用建議

  • 可能影響低階裝置的效能
  • 模糊效果需要GPU加速
  • 超出核心功能的客製化有限
  • 最適合淺色主題介面
  • 較舊作業系統版本上可能出現渲染不一致的情況

原始 README

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

Crystal Bottom Navigation Bar


undefined undefined
undefined undefined undefined undefined undefined
undefined undefined

A highly flexible bottom navigation bar that allows you to tailor it to your specific needs without any constraints. Elevate your UI/UX with seamless animations, customizable appearance—including the option to incorporate blur effects—and the ability to fully personalize the interface.

Styles

Screenshot 1

Simple BottomBar

With Border

Screenshot 2

Simple BottomBar

With Badge


CRYSTAL BOTTOM NAVIGATION BAR


  • Blur navigation bar
  • Frosted navigation bar
  • Floating navigation bar
  • Rounded navigation bar
  • Modern navigation bar

Getting Started

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

dependencies:
    crystal_navigation_bar:

import 'package:crystal_navigation_bar/crystal_navigation_bar.dart';

How to use it

Use CrystalNavigationBar constructor in Your app with in Scaffold's bottomNavigationBar:

Make sure extendBody in Scaffold should be true to use Floating behavior

      extendBody: true,

if you do not want to make round navigation 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:  CrystalNavigationBar(
          currentIndex: _SelectedTab.values.indexOf(_selectedTab),
          onTap: _handleIndexChanged,
          indicatorColor: Colors.white,
          // enableFloatingNavBar: false
          items: [
            
            
          ],
        ),
  );
}

basic implementation

Widget build(BuildContext context) {
    return Scaffold(
      extendBody: true,
      body: SizedBox(
        height: MediaQuery.of(context).size.height,
        child: Image.network(
          "https://images.pexels.com/photos/1671325/pexels-photo-1671325.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
          fit: BoxFit.fitHeight,
        ),
      ),
      bottomNavigationBar: Padding(
        padding: const EdgeInsets.only(bottom: 10),
        child: CrystalNavigationBar(
          currentIndex: _SelectedTab.values.indexOf(_selectedTab),
          // indicatorColor: Colors.white,
          unselectedItemColor: Colors.white70,
          backgroundColor: Colors.black.withOpacity(0.1),
          // outlineBorderColor: Colors.black.withOpacity(0.1),
          borderWidth: 2,
          outlineBorderColor: Colors.white,
          onTap: _handleIndexChanged,
          items: [
            /// Home
            CrystalNavigationBarItem(
              icon: IconlyBold.home,
              unselectedIcon: IconlyLight.home,
              selectedColor: Colors.white,
              badge: Badge(
                label: Text(
                  "9+",
                  style: TextStyle(color: Colors.white),
                ),
              ),
            ),

            /// Favourite
            CrystalNavigationBarItem(
              icon: IconlyBold.heart,
              unselectedIcon: IconlyLight.heart,
              selectedColor: Colors.red,
            ),

            /// Add
            CrystalNavigationBarItem(
              icon: IconlyBold.plus,
              unselectedIcon: IconlyLight.plus,
              selectedColor: Colors.white,
            ),

            /// Search
            CrystalNavigationBarItem(
                icon: IconlyBold.search,
                unselectedIcon: IconlyLight.search,
                selectedColor: Colors.white),

            /// Profile
            CrystalNavigationBarItem(
              icon: IconlyBold.user_2,
              unselectedIcon: IconlyLight.user,
              selectedColor: Colors.white,
            ),
          ],
        ),
      ),
    );
  }

The constructor has 19 attributes related to the Widget:

  • items: A list of tabs to display, example Home, Profile,Search, etc
  • height: The height of CrystalNavigationBar, [Default] & [Minimum] height is 105,
  • currentIndex: The tab to display.
  • onTap:Returns the index of the tab that was tapped.
  • outlineBorderColor : Border Color of the Bottom bar.
  • borderWidth : Border Width of the Bottom bar.
  • badge : Badge to display. (to display notification count etc).
  • 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.
  • indicatorColor:The color of the tab 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:background 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.

iconly package is used for Icons in the demo/example

Adjust Colors of background, unselectedItemColor, selectedItemColor according to your UI for better Design.

Example Usage

See Example Code for more info.

Contributing

Every pull request is welcome.

Contributors

Imtiaz Ahmad

  • Twitter
  • GitHub
  • LinkedIn

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案