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

套件詳情v1.1.3

floatingpanel

浮動面板可幫助您建立簡單的浮動選單,您可以將其拖曳並放置於螢幕的任何邊緣(水平方向)。

近 30 天下載
44
喜歡數
130
Pub 分數
30

安裝套件

flutter pub add floatingpanel

套件介紹

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

FloatingPanel 是一個 Flutter 套件,讓開發者能夠建立可拖曳的浮動選單,這些選單可以置於螢幕的任何水平邊緣。它提供流暢、互動式的體驗,讓使用者透過手勢移動面板,非常適合快速存取動作或導航選項。此套件輕量且能順暢整合至現有的 Flutter 應用程式中。支援透過可設定的屬性來自訂外觀與行為。設計以簡潔為核心,FloatingPanel 透過提供直覺的方式呈現情境式控制,提升使用者介面設計。

適用情境

  • 快速操作選單
  • 上下文導航
  • 基於手勢的使用者介面元素
  • 行動應用程式工具列
  • 可客製化的側板
  • 使用者偏好設定

主要特色

  • 可拖動定位
  • 水平邊緣對齊
  • 流暢的手勢支援
  • 可自定外觀
  • 輕量級實現
  • 與 Flutter 的輕鬆整合

適合對象

  • 移動應用開發者
  • UI/UX 設計師
  • 互動式小部件創建器
  • Flutter 初學者
  • 需要浮動控制項的應用
  • 手勢密集型介面

使用建議

  • 限於水平邊緣
  • 無垂直邊緣支援
  • 可能需要額外的樣式
  • 不適合複雜佈局
  • 性能取決於內容的複雜度
  • 需要手動處理邊緣約束

原始 README

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

Flutter Float Box

Float Box - v1.0

Overview

alt Floating Panel

Float box is a true floating panel for your app, which can be docked to either edges of the screen (horizontally).

Code - Basic:

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

import 'package:widgets/float_box.dart'; // Import Float Box Widget

Stack(
    children: [
        ...

        // Add Float Box Panel at the bottom of the 'stack' widget.
        FloatBoxPanel(
            buttons: [
                // Add Icons to the buttons list.
                Icons.message,
                Icons.photo_camera,
                Icons.video_library
            ]
        );
    ]
);

alt Floating Panel

Code - All Properties:

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

    import 'package:widgets/float_box.dart'; // Import Float Box Widget
    
    Stack(
        children: [
            ...
    
            // Add Float Box Panel at the bottom of the 'stack' widget.
            FloatBoxPanel(
                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
                ]
            );
        ]
    );

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。