0 purchases
top modal sheet
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';
copied to clipboard
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; });
},
)
copied to clipboard
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!
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.