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

floating_menu_panel 封面
套件詳情v0.0.2

floating_menu_panel

浮動菜單面板

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
42
喜歡數
29
Pub 分數
130

安裝套件

flutter pub add floating_menu_panel

套件介紹

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

一個 Flutter 套件,提供浮動選單面板,具備互動式且可自訂的浮動操作介面。它讓使用者能透過一個緊湊、動畫化的面板存取多個動作,該面板可展開或收合。非常適合需要快速存取常見功能又不雜亂 UI 的應用程式。此面板支援各種設定,包含定位、動畫與自訂子組件。相容於所有主要平台,可提升行動與桌面應用程式的易用性。

適用情境

  • 快速存取應用動作
  • 增強使用者導航
  • 減少使用者介面雜亂
  • 可自定義的操作面板
  • 行動和桌面應用程式整合

主要特色

  • 動畫展開和收合
  • 可自訂的位置和大小
  • 支援多個子元件
  • 跨平台相容性
  • 可設定的動畫
  • 與現有 UI 的輕鬆整合

適合對象

  • 行動和桌面應用程式
  • 需要手勢菜單的應用程式
  • 尋求互動元素的UI設計師
  • 想要輕量級解決方案的開發者
  • 空間受限介面的專案

使用建議

  • 可能需要仔細放置以避免重疊
  • 低端設備上的動畫性能
  • 與完整自定義小部件相比,自訂選項較少
  • 不適合複雜的嵌套選單
  • 需要關注無障礙標準

原始 README

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

floating_menu_panel

Floating menu panel

Basic:

This is what you needs to get the widget working. Import Widget -> Add 'FloatingMenuPanel' at the bottom of your stack widget. Add icons inside the "buttons" list.

import 'package:floating_menu_panel/floating_menu_panel.dart'; // Import Floating Menu Panel

return MaterialApp(
      home: Scaffold(
        body: Stack(
          children: [
            FloatingMenuPanel(
              onPressed: (index) {
                print('SELECT__: $index');
              },
              buttons: [
                Icons.star_border_outlined,
                Icons.add_comment,
                Icons.music_note
              ],
            ),
          ],
        ),
      ),
    );

alt Floating Menu Panel

All Properties:

These are all the properties you can customize of the floating panel.

    import 'package:floating_menu_panel/floating_menu_panel.dart'; // Import Floating Menu Panel
    
    Stack(
        children: [
            ...
    
            // Add Float Box Panel at the bottom of the 'stack' widget.
            FloatingMenuPanel(
                positionTop: 0.0, // Initial Top Position
                positionLeft: 0.0, // Initial Left Position
                backgroundColor: Color(0xFFEDEDED), // Color of the panel
                contentColor: Colors.black, // Color of the icons
                panelShape: PanelShape.rectangle, // 'PanelShape.rectangle' or 'PanelShape.rounded', border radius property doesn't work in the rounded shape
                borderRadius: BorderRadius.circular(8.0), // Border radius of the panel
                dockType: DockType.inside, // 'DockType.inside' or 'DockType.outside', weather to dock the panel outside or inside the edge of the screen
                dockOffset: 5.0, // Offset the dock from the edge depending on the 'dockType' property
                panelAnimDuration: 300, // Duration for panel open and close animation
                panelAnimCurve: Curves.easeOut, // Curve for panel open and close animation
                dockAnimDuration: 300, // Auto dock to the edge of screen - animation duration
                dockAnimCurve: Curves.easeOut, // Auto dock animation curve
                panelOpenOffset: 20.0, // Offset from the edge of screen when panel is open
                panelIcon: Icons.menu, // Panel open/close icon
                size: 70.0, // Size of single button in the panel
                iconSize: 24.0, // Size of icons
                borderWidth: 1.0, // Width of panel border
                borderColor: Colors.black, // Color of panel border
                onPressed: (index) {
                    print("Clicked on item: $index");
                }
                buttons: [
                    // Add Icons to the buttons list.
                    Icons.message,
                    Icons.photo_camera,
                    Icons.video_library
                ]
            );
        ]
    );

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。