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

top_modal_sheet 封面
套件詳情v2.1.0

top_modal_sheet

一個純 Dart 實現的簡單頂部模態對話方塊。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1700
喜歡數
31
Pub 分數
160

安裝套件

flutter pub add top_modal_sheet

套件介紹

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

一種輕量級的純 Dart 實現,用於從螢幕頂部滑出的模態面板。設計簡潔,易於整合,提供乾淨的介面來顯示表單、選單或警示內容,無需複雜的相依性。相容所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。非常適合尋求最小化、可自訂替代方案來取代標準底部面板的開發者。

適用情境

  • 顯示表單輸入
  • 顯示操作選單
  • 顯示警告或通知
  • 實現可摺疊的內容面板
  • 建立自定覆疊層

主要特色

  • 純 Dart 實現
  • 跨平台相容性
  • 簡單 API
  • 可自定義動畫
  • 輕量且快速
  • 支援拖曳關閉

適合對象

  • 希望使用最小化頂部面板的開發者
  • 依賴限制嚴格的專案
  • 針對多個平台的應用程式
  • 需要平滑過渡的UI組件
  • 可自訂的覆蓋層設計

使用建議

  • 有限的內建樣式選項
  • 無原生平台特定行為
  • 需要手動處理關閉邏輯
  • 不適合複雜的嵌套佈局
  • 可能需要額外的程式碼以支援無障礙功能

原始 README

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

pub package

top_modal_sheet

Simple modal sheet that appears from the top of the screen

Installations

Add top_modal_sheet: ^2.1.0 in your pubspec.yaml dependencies. And import it:

import 'package:top_modal_sheet/top_modal_sheet.dart';

How to use

Simply call showModalTopSheet to display it

MaterialButton(
  color: Colors.white,
  elevation: 5,
  child: const Text("Show TopModal 1"),
  onPressed: () async {
    var value = await showTopModalSheet<String?>(context, DummyModal());
    setState(() { _topModalData = value; });
  },
)

For a more detail example please take a look at the example folder.

Example

-

If something is missing, feel free to open a ticket or contribute!

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。