Questions tagged [flutter-showmodalbottomsheet]

130 questions
0
votes
2 answers

Flutter BottomSheet setstate cannot refresh main page

the setstate in bottomsheet is not working even using statefulwidget... i want to refresh the display of parent after popping bottomsheet should i call setstate in void instead? how to do this ? ElevatedButton( ... onPressed: () { …
icantcode
  • 142
  • 1
  • 15
0
votes
0 answers

showModalBottomSheet adaptive size Flutter

I have the next problem, having a little number of children allows users to scroll even though there is an empty space Future buildScrollableSheet([Widget? header]) { return showModalBottomSheet( context: context, …
0
votes
1 answer

Cupertino modal bottom sheet fit with inside navigation

Is it possible to have two modal bottom sheets with inside navigation but different height? For instance, the first bottom sheet has 3 elements and sized to its child (Column with 3 List Tiles) and the second bottom sheet is the same but has 5…
twinsinc
  • 123
  • 2
  • 11
0
votes
1 answer

Flutter: check the modal bottom sheet is closed by drag down or by Navigator.pop

showCupertinoModalBottomSheet( expand: true, context: context, backgroundColor: ColorPalettes.white, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.only( topLeft: Radius.circular(10), …
0
votes
1 answer

How do i print the value which is coming from modal bottom sheet to the main scaffold body in dart+flutter

ive created a text and icon button, onpressing that icon modal bottom sheet gets generated, in that and ive created a separate dart file with text field and a submit button when giving an input on text field and after clicking on submit button the…
0
votes
2 answers

flutter scrollable modal bottom sheet

Is there a way to make the ModalBottomSheet with a fixed heigh i don't want it's height to expand when scrolling This is the code i used showModalBottomSheet( context: context, isScrollControlled: true, …
0
votes
1 answer

Snackbar action give "Looking up a deactivated widget's ancestor is unsafe" error if ancestor is close

I have showModalBottomSheet with list of folder name. If user want to add file into folder, click add and ModalBottomSheet will show up and user tap the folder name and call the bloc event to add file into folder. If success, I got…
Alex Aung
  • 2,637
  • 5
  • 34
  • 63
0
votes
2 answers

Is it Possible to have common showModalBottomSheet for multiple pages in flutter

I want to make Bottom Sheet as a separate function but can't find anywhere how to achieve it. Everywhere Bottom Sheet is added as a function but is it possible to make Bottom Sheet as a common function so that I can reuse that some where else?
Elam
  • 413
  • 6
  • 19
0
votes
1 answer

How to display the value chosen?

The value that I chose from the DropdownMenuItem (eg: Malaysia (+06) ), the chosen value will be displayed, however, when I navigate back or proceed to other interfaces, it will disappear. Problem: How to make the chosen value maintained at the…
0
votes
1 answer

Update button's visibility inside ModalBottomSheet from parent widget

I have Widget1 which opens up ModalBottomSheet. ModalBottomSheet contains TextField(EditText) & one button. User can input values to TextField that can make button enable/disable based on some validation. TextField is something customized component.…
0
votes
1 answer

flutter - set snappings for drag showModalBottomSheet

I want to use a modal bottom sheet in the flutter. but I can't drag it. showModalBottomSheet( context: context, isScrollControlled: true, isDismissible: true, enableDrag: true, shape: RoundedRectangleBorder( borderRadius:…
user16886755
0
votes
2 answers

How to get values from one class screen to another class and populate those values in flutter?

I have one main class and TimePickerScreen class, I am trying to get the values from TimePickerScreen class to Main class to populate those values, I wraped From and To Text with GestureDetector to call TimePickerScreen class within bottomSheet and…
0
votes
1 answer

Flutter - TextField in StatefulBuilder in modalBottomSheet not working

I have a problem. In my code, I call showModalBottomSheet and inside of it, I have a feedback form. The user can select a reaction and then leave a comment to submit. Therefore, I had to use a StatefulBuilder to use setState inside the modal. The…
0
votes
2 answers

Automatically close a Flutter modal bottom sheet when the app is paused

I'm using showModalBottomSheet to show a modal material design bottom sheet. showModalBottomSheet( context: context, builder: (BuildContext context) { ... I'd like this bottom sheet to automatically close (pop?) when Flutter Android app…
0
votes
1 answer

showModalBottomSheet stacking when using a Switch

I'm trying to show a privacy policy banner on the login screen of my app. Whenever I click the switch another ModalBottomSheet stacks on top of the other one though. I've tried to extract the button in an seperated Statefullwidget no change. Any…
1 2 3
8 9