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

flutter_side_menu 封面
套件詳情v0.5.41

flutter_side_menu

Flutter 的完整可自定側邊菜單已用作相關頁面、導航項目、篩選側邊欄等的目錄。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1.8萬
喜歡數
184
Pub 分數
130

安裝套件

flutter pub add flutter_side_menu

套件介紹

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

Flutter 邊欄選單是一個完全可自訂的側邊導航元件,專為 Flutter 應用程式設計。它支援多種使用情境,例如導航選單、篩選面板以及相關頁面目錄。以彈性為核心打造,可無縫整合於 Android、iOS、Web、macOS、Windows 與 Linux 平台。此套件讓開發者能根據應用程式的特定需求,客製化選單的外觀與行為,透過直覺式導航提升使用者體驗。輕量級設計與響應式佈局,使其非常適合需要結構化、易存取的側邊介面之應用。

適用情境

  • 導航選單
  • 篩選面板
  • 相關頁面目錄
  • 儀表板佈局
  • 設定導航
  • 內容分類

主要特色

  • 完全可自定的設計
  • 跨平台支援
  • 響應式佈局
  • 輕鬆整合
  • 可自定義的動畫
  • 可擴展結構

適合對象

  • 具有複雜導航的應用程式
  • 儀表板介面
  • 行動和網頁應用
  • 管理面板
  • 使用者設定區段

使用建議

  • 需要手動樣式設定以進行高級自訂
  • 有限的內建主題
  • 可能需要額外的狀態管理
  • 未針對非常大的項目清單進行優化
  • 依賴於父控制項上下文

原始 README

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

Flutter Side Menu

logo
GitHub Pub Version GitHub repo size

Flutter's full customizable side menu has been used as a directory for Related Pages, Navigation Items, Filter side and more.

Flutter Side Menu Screenshots
Navigation Side Filter Side

Usage

Add dependency

Please check the latest version before installation. If there is any problem with the new version, please use the previous version

dependencies:
  flutter:
    sdk: flutter
  # add flutter_side_menu
  flutter_side_menu: ^{latest version}
Add the following imports to your Dart code
import 'package:flutter_side_menu/flutter_side_menu.dart';
Property
Property Type Default Value Description
builder SideMenuBuilder null Return 'SideMenuData' that includes headers, footers, items, or custom child
controller SideMenuController null The 'controller' that can be used to open, close, or toggle side menu.
mode SideMenuMode SideMenuMode.auto The 'SideMenuMode' which is auto, open or compact and can determine the menu state
priority SideMenuPriority SideMenuPriority.mode The 'SideMenuPriority' which is mode or sizer. in sizer mode the side menu width not change if user set custom size with 'Resizer'
position SideMenuPosition SideMenuPosition.left The 'SideMenuPosition' which is left or right.
minWidth double 50.0 The 'minWidth' value is used to determine the side menu width in the smallest case.
maxWidth double 250.0 The 'maxWidth' value is used to determine the side menu width in the largest case.
hasResizer bool true The 'hasResizer' enable 'Resizer' widget for side menu. With 'Resizer' the side menu width can be customized by the user.
resizerData ResizerData ResizerData() The 'ResizerData' that can set custom style for a 'Resizer'.
hasResizerToggle bool true The 'hasResizerToggle' enable 'ResizerToggle' widget for side menu. With 'ResizerToggle' button you can toggle the width of the side menu between 'minWidth' or 'maxWidth'.
resizerToggleData ResizerToggleData ResizerToggleData() The 'resizerToggleData' that can set custom style for a 'ResizerToggle'.
backgroundColor Color Color(0xffffffff) The 'backgroundColor' it's used to determine the side menu background color
Example
import 'package:flutter/material.dart';
import 'package:flutter_side_menu/flutter_side_menu.dart';

void main() => runApp(
      MaterialApp(
        home: Material(
          child: Scaffold(
            body: Row(
              children: [
                SideMenu(
                  builder: (data) => SideMenuData(
                    header: const Text('Header'),
                    items: [
                      SideMenuItemDataTile(
                        isSelected: true,
                        onTap: () {},
                        title: 'Item 1',
                        icon: const Icon(Icons.home),
                      ),
                    ],
                    footer: const Text('Footer'),
                  ),
                ),
                Expanded(
                  child: Container(
                    color: Colors.white,
                    child: const Center(
                      child: Text(
                        'body',
                      ),
                    ),
                  ),
                ),
                SideMenu(
                  position: SideMenuPosition.right,
                  builder: (data) => const SideMenuData(
                    customChild: Text('Custom view'),
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。