You can also achieve it by use of whenComplete
function of showModalBottomSheet
.
Let’s see below code
showModalBottomSheet<void>(
context: context,
builder: (BuildContext context) {
return Container(
height: 260.0,
child: Text('I am text')
);
},
).whenComplete(() {
print('Hey there, I\'m calling after hide bottomSheet');
});
Related Contents:
- How to change status bar color in Flutter?
- Flutter remove all routes
- Flutter: Setting the height of the AppBar
- How do I bold (or format) a piece of text within a paragraph?
- Flutter get context in initState method
- how to use local flutter package in another flutter application?
- Dart Multiple Constructors
- flutter corner radius with transparent background
- Close modal bottom sheet programmatically in flutter
- How do I rotate something 15 degrees in Flutter?
- how to set showModalBottomSheet to full height?
- update dart sdk for flutter
- Textfield validation in Flutter
- Flutter – ‘initialValue == null || controller == null’: is not true. error
- Display SnackBar in Flutter
- Flutter: Outline input border
- Dart convert int variable to string
- How to get response body with request.send() in dart
- Is there a way to print a console message with Flutter?
- Expanded widgets must be placed inside Flex widgets
- How to pass data from child widget to its parent
- Displaying notification badge on BottomNavigationBar’s Icon
- How do I call async property in Widget build method
- How do I only apply padding to the text in a TextField in Flutter?
- No Directionality widget found
- Constructor Optional Params
- How do I pass non-string data to a named route in Flutter?
- How to make HTTP POST request with url encoded body in flutter?
- Flutter – FloatingActionButton in the center
- How to get the last n-characters in a string in Dart?
- How to customize a date picker
- How to remove extra padding around AppBar leading icon in Flutter
- Flutter : Where is the title of Material App used?
- How can I read (from disk) and resize an image, in Flutter/Dart
- How to convert to double
- Flutter setState to another class?
- Flutter TabBar Without AppBar
- how to create a row of scrollable text boxes or widgets in flutter inside a ListView?
- How do I cancel Future.delayed?
- Error: Only static members can be accessed in initializers what does this mean?
- How to use the PI constant in Dart
- Flutter background of unsafe area in SafeArea widget.
- Flutter TextField with currency format
- How do you pass arguments from command line to main in Flutter/Dart?
- using the new keyword in flutter [duplicate]
- Flutter Firestore Server side Timestamp
- What is the difference between streamController.add() and streamController.sink.add()?
- Flutter position fixed equivalent
- Flutter snackbar dismiss on SnackBarAction onPressed
- Flutter Navigator.replace() example