class ModalBottomSheet { static void _moreModalBottomSheet(context) { Size size = MediaQuery.of(context).size; showModalBottomSheet( isScrollControlled: true, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(40.0), ), context: context, builder: (BuildContext bc) { return Container(...
Use case How to know whether bottomSheet of the Scaffold is open or not through scaffoldKey? Here's how the sheet is open: scaffoldKey.currentState!.showBottomSheet(...); Newer versions of flutter have no encapsulated methods within scaffoldKey.currentState that can be used to decide whether...
showModalBottomSheet( shape: const RoundedRectangleBorder( borderRadius: BorderRadius.vertical(top: Radius.circular(30.0)), ), Complete runnable example: import 'package:flutter/material.dart'; const Color darkBlue = Color.fromARGB(255, 18, 32, 47); void main() { runApp(MaterialA...
I want with Get.bottomSheet, I tried to wrap in SafeArea but not worked. In your library how can I do that? Owner jonataslaw commented Apr 18, 2020 I understand, this is a problem with Flutter's PopupRoute. No one widget that uses PopupRoute respect to the SafeArea (BottomSheets, ...
i tried to use notifyListeners, but not having success. _controller.appointmentDataSource.notifyListeners(CalendarDataSourceAction.add, _controller.appointments);// here appointment has been updated with a property updated on database.// this method executed after operation in onPressed function button ...
In fact, you can useStatefullBuilderbut the problem is that when you use this widget you cant change the state of the base screen! Prefer to navigate to a new screen in order to usesetState. Share Copy link Improve this answer Follow ...
For example, my custom german localization that i had to create to use CupertinoDatePicker in german language looks like this: import 'dart:async'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; class _CupertinoLocalizations...
onTap: ()async{awaitshowModalBottomSheet<void>( context: context, builder: (BuildContext context) {return_buildGenderBottomPicker(); }, ); }); } and the layout I obtained: Of course there is still some work to do to improve the code, use the themes and finally make it a Wi...
did you use EmojiPicker widget on the modal window like showModalBottomSheet? If not, I recommend using a modal window. I think if you use EmojiPicker widget using a modal window, then GestureDetector onTap will work. For example, ... TextEditingController _textController = TextEditingControlle...