modal_bottom_sheet
modal_bottom_sheet copied to clipboard
Getting covered by keyboard
Modal bottom sheet is getting covered by soft keyboard when there is a text field in it . How to solve that ?
I just solved it. Just add padding.. this is my code
showMaterialModalBottomSheet( context: context, bounce: true, builder: (context) => SingleChildScrollView( controller: ModalScrollController.of(context), padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), child: child, ), );
I just solved it. Just add padding.. this is my code
showMaterialModalBottomSheet( context: context, bounce: true, builder: (context) => SingleChildScrollView( controller: ModalScrollController.of(context), padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), child: child, ), );
hi! it is works at flutter >=3.10.5?
@berdibekovaG Yes I am currently using it on flutter 3.10.6