FLUTTER ECOSYSTEM

Pilaba/TopModalSheet

一個簡單的 Flutter 上方模態彈出層

TopModalSheet 專案封面
Stars
8
Forks
11
最近推送(UTC)
2024年1月31日
專案狀態
未封存
Baldemar Alejandres GitHub avatar
GITHUB User

Baldemar Alejandres ↗

stay awhile and listen.

superkickoff.appColima, Mx官方網站 ↗
語言C++CMakeDartHTMLCSwiftKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}
  • flutter_lints開發依賴^3.0.1

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 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

https://raw.githubusercontent.com/Pilaba/TopModalSheet/master/example/screensshots/main_screen.png https://raw.githubusercontent.com/Pilaba/TopModalSheet/master/example/screensshots/top_modal.png https://raw.githubusercontent.com/Pilaba/TopModalSheet/master/example/screensshots/top_modal_result.png

-

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