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

multilevel_drawer 封面
套件詳情v2.0.0

multilevel_drawer

一個容易實作的多層抽屜,適用於 Flutter 應用程式。只要用它取代一般的 Scaffold 抽屜,就能立即上手。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
73
喜歡數
132
Pub 分數
130

安裝套件

flutter pub add multilevel_drawer

套件介紹

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

一個簡單且可自訂的多層級抽屜,專為 Flutter 應用設計,作為標準 Scaffold 抽屜的即插即用替代品。它支援巢狀選單的階層導航,提升複雜應用的使用者體驗。此套件支援所有主要平台,設定簡單——只需將預設抽屜替換為此組件。適用於需要結構化、可摺疊導航的應用。

適用情境

  • 複雜的應用程式導航
  • 階層式選單系統
  • 移動和網頁儀表板
  • 管理面板
  • 使用者設定,包含巢狀區段

主要特色

  • 嵌套抽屜層級
  • 與 Scaffold 的輕鬆整合
  • 跨平台支援
  • 可自定外觀
  • 最小設定需求

適合對象

  • 開發功能豐富應用程式的開發者
  • 具有深層導航結構的應用程式
  • 尋求直覺導航的設計人員
  • 優先快速實施的團隊

使用建議

  • 可能需要自定樣式以實現進階設計
  • 有限的內建動畫
  • 最適合中等嵌套層級
  • 不太適合非常簡單的導航需求
  • 需要仔細的使用者體驗規劃來處理深層級層

原始 README

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

MultiLevel Drawer

An easy to implement Multi Level Drawer for Flutter Applications. Just use this in place of regular Scaffold Drawer and you are ready to go.

Current Features

  • Add MultiLevel Drawer to Selected Items
  • Change Color of Main and Sub menu According to your Application Needs.

Demo

Usage

To Use, simply add MultiLevelDrawer to your Scaffold's drawer property:

      child: Scaffold(
        drawer: MultiLevelDrawer(
          backgroundColor: Colors.white,
          rippleColor: Colors.white,
          subMenuBackgroundColor: Colors.grey.shade100,
          header: Container(                  // Header for Drawer
            height: size.height * 0.25,
            child: Center(child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Image.asset("assets/dp_default.png",width: 100,height: 100,),
                SizedBox(height: 10,),
                Text("RetroPortal Studio")
              ],
            )),
          ),

          children: [           // Child Elements for Each Drawer Item
            MLMenuItem(
                leading: Icon(Icons.person),
                trailing: Icon(Icons.arrow_right),
                content: Text(
                  "My Profile",
                ),
                subMenuItems: [
                  MLSubmenu(onClick: () {}, submenuContent: Text("Option 1")),
                  MLSubmenu(onClick: () {}, submenuContent: Text("Option 2")),
                  MLSubmenu(onClick: () {}, submenuContent: Text("Option 3")),
                ],
                onClick: () {}),
            MLMenuItem(
                leading: Icon(Icons.settings),
                trailing: Icon(Icons.arrow_right),
                content: Text("Settings"),
                onClick: () {},
                subMenuItems: [
                  MLSubmenu(onClick: () {}, submenuContent: Text("Option 1")),
                  MLSubmenu(onClick: () {}, submenuContent: Text("Option 2"))
                ]),
            MLMenuItem(
              leading: Icon(Icons.notifications),
              content: Text("Notifications"),
              onClick: () {},
            ),
            MLMenuItem(
                leading: Icon(Icons.payment),
                trailing: Icon(Icons.arrow_right),
                content: Text(
                  "Payments",
                ),
                subMenuItems: [
                  MLSubmenu(onClick: () {}, submenuContent: Text("Option 1")),
                  MLSubmenu(onClick: () {}, submenuContent: Text("Option 2")),
                  MLSubmenu(onClick: () {}, submenuContent: Text("Option 3")),
                  MLSubmenu(onClick: () {}, submenuContent: Text("Option 4")),
                ],
                onClick: () {}),
          ],
        ),
        appBar: AppBar(
          backgroundColor: Colors.white,
          iconTheme: IconThemeData(color: Colors.black),
          title: Text(
            "Multi Level Menu",
            style: TextStyle(color: Colors.black),
          ),
        ),
        body: Container(
            decoration: BoxDecoration(
              gradient:
              LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [
                Color.fromRGBO(255, 65, 108, 1.0),
                Color.fromRGBO(255, 75, 43, 1.0),
              ]),
            ),
            child: Center()),
      ),

Important Classes:

MLMenuItem //For Each direct child item of Drawer
MLSubmenu  //For Adding Submenu to MLMenuItem

Roadmap

Plans to add more customizations.

License

MIT

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。