Created
April 26, 2022 01:15
-
-
Save indraAsLesmana/4ddccea30944d7989a9b05b3f94258bb to your computer and use it in GitHub Desktop.
ModalBottomSheet above Keyboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| showModalBottomSheet( | |
| context: context, | |
| isScrollControlled: true, | |
| builder: (context) => SingleChildScrollView( | |
| child: Container( | |
| color: Color(0xff757575), | |
| padding: EdgeInsets.only( | |
| bottom: MediaQuery.of(context).viewInsets.bottom), | |
| child: Container( | |
| padding: EdgeInsets.all(20.0), | |
| child: Column( | |
| crossAxisAlignment: CrossAxisAlignment.stretch, | |
| children: [ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Positioning the BottomSheet above the Keyboard issue on Android.
isScrollControlled: trueto bottomSheet propertySingleChildScrollViewand addpadding: EdgeInsets.only( bottom: MediaQuery.of(context).viewInsets.bottom)