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

custom_line_indicator_bottom_navbar 封面
套件詳情v0.0.8

custom_line_indicator_bottom_navbar

一個完全可自定義的底部導航欄,帶有頂部和底部指示器以及漸變效果。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
132
喜歡數
28
Pub 分數
150

安裝套件

flutter pub add custom_line_indicator_bottom_navbar

套件介紹

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

一個高度可自訂的底部導航欄,具備頂部和底部指示器的漸變支援。專為尋求跨多個平台現代、視覺豐富導航體驗的開發者設計。此套件允許對指示器的顏色、形狀、動畫和定位進行細緻控制,以實現獨特的UI設計。它能順暢整合至Flutter應用程式中,並支援所有主要平台,包括Android、iOS、Web、macOS、Windows和Linux。

適用情境

  • 帶有視覺反饋的自定義應用導航
  • 創建帶有漸變的品牌底部欄
  • 透過動畫指示器提升使用者體驗
  • 建構多平台應用程式
  • 設計現代移動和網路介面

主要特色

  • 完全可自定義的指標
  • 頂部和底部均支援漸變
  • 標籤之間的動畫過渡
  • 跨平台相容性
  • 可設定的顏色和形狀
  • 平滑滾動和輕觸互動

適合對象

  • Flutter 開發人員建構現代 UI
  • 注重設計的應用程式需要自定義導航
  • 針對多個平台的應用
  • 希望對底部導航外觀進行細緻控制的開發者

使用建議

  • 需要理解 Flutter 布局原理
  • 可能需要為複雜主題添加額外的樣式
  • 大量動畫帶來的效能影響
  • 除了基本設定外,文件有限
  • 最適合包含3-6個導航項目之應用程式

原始 README

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

custom_line_indicator_bottom_navbar

A fully customizable bottom navigation bar with line indicators and gradient.

alert2 alert2

Usage without gradient:

        class MyExample extends StatefulWidget {
        @override
        _MyExampleState createState() => _MyExampleState();
        }

        class _MyExampleState extends State<MyExample> {
        int _selectedIndex = 0; //default index

        List<Widget> _widgetOptions = [
            Text('Home'),
            Text('Account'),
            Text('Leaves'),
            Text('Loyalty'),
            Text('Requests'),
        ];
        @override
        Widget build(BuildContext context) {
            return Scaffold(
            appBar: AppBar(
                title: Text('Example'),
            ),
            body: Center(
                child: _widgetOptions.elementAt(_selectedIndex),
            ),
            bottomNavigationBar: CustomLineIndicatorBottomNavbar(
                selectedColor: Colors.blue,
                unSelectedColor: Colors.black54,
                backgroundColor: Colors.white,
                currentIndex: _selectedIndex,
                onTap: (index) {
                setState(() {
                    _selectedIndex = index;
                });
                },
                enableLineIndicator: true,
                lineIndicatorWidth: 3,
                indicatorType: IndicatorType.Top,
                // gradient: LinearGradient(
                //   colors: kGradients,
                // ),

                customBottomBarItems: [
                CustomBottomBarItems(
                    label: 'Home',
                    icon: Icons.home,
                ),
                CustomBottomBarItems(
                    label: 'Account',
                    icon: Icons.account_box_outlined,
                ),
                CustomBottomBarItems(
                    label: 'Leaves', icon: Icons.calendar_today_outlined),
                CustomBottomBarItems(
                    label: 'Loyalty',
                    icon: Icons.card_giftcard_rounded,
                ),
                CustomBottomBarItems(
                    label: 'Requests',
                    icon: Icons.list,
                ),
                ],
            ),
            );
        }
        }

Usage with gradient :

class MyExample extends StatefulWidget {

    @override
    _MyExampleState createState() => _MyExampleState();
}

class _MyExampleState extends State<MyExample> {
    int _selectedIndex = 0; //default index

    List<Widget> _widgetOptions = [
        Text('Home'),
        Text('Account'),
        Text('Leaves'),
        Text('Loyalty'),
        Text('Requests'),
    ];
    @override
    Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
            title: Text('Example'),
        ),
        body: Center(
            child: _widgetOptions.elementAt(_selectedIndex),
        ),
        bottomNavigationBar: CustomLineIndicatorBottomNavbar(
        selectedColor: Colors.white,
        unSelectedColor: Colors.black54,
        backgroundColor: Colors.white,
        currentIndex: _selectedIndex,
        onTap: (index) {
            setState(() {
            _selectedIndex = index;
            });
        },
        enableLineIndicator: true,
        lineIndicatorWidth: 3,
        indicatorType: IndicatorType.Top,
        gradient: LinearGradient(
            colors: [Colors.pink, Colors.yellow],
        ),
        customBottomBarItems: [
            CustomBottomBarItems(
                label: 'Home',
                icon: Icons.home,
            ),
            CustomBottomBarItems(
                label: 'Account',
                icon: Icons.account_box_outlined,
            ),
            CustomBottomBarItems(
                label: 'Leaves', icon: Icons.calendar_today_outlined),
            CustomBottomBarItems(
                label: 'Loyalty',
                icon: Icons.card_giftcard_rounded,
            ),
            CustomBottomBarItems(
                label: 'Requests',
                icon: Icons.list,
            ),
        ],
        ),
    );
    }
}

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。