v2.1.0top_modal_sheet
一個純 Dart 實現的簡單頂部模態對話方塊。
31喜歡 3700近 30 天下載160Pub 分數
AndroidiOSWebmacOSWindowsLinux
一個簡單的 Flutter 上方模態彈出層
{"sdk":"flutter"}{"sdk":"flutter"}^3.0.1以下為英文專案原文快照,最新內容請造訪 GitHub。
Simple modal sheet that appears from the top of the screen
Add top_modal_sheet: ^2.1.0 in your pubspec.yaml dependencies. And import it:
import 'package:top_modal_sheet/top_modal_sheet.dart';
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.
If something is missing, feel free to open a ticket or contribute!