I opened a new page through showModalBottomSheet. However, when you open the keyboard through textformfield, there is a phenomenon that the page does textformfield. I don't know what the problem is. Thank you so much for giving me a hint or an answer.
InkWell buildAddBtn() {
return InkWell(
child: Icon(
Icons.add,
size: 30.0,
),
onTap: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (BuildContext context) => SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom),
child: AddPage(logInUsr: usrEmail),
),
),
);
},
);
}
1 create modalBottomSheet that take all height
2 add Column with children
Example
showModalBottomSheet(
context: ctx,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (ctx) => Container(
height: double.infinity,
width: double.infinity,
color: Colors.transparent,
child: Column(
children: [
Expanded(
child: GestureDetector(
onTap: () => Navigator.of(context).pop(),
child: Container(
color: Colors.transparent,
),
),
),
YourBottomSheet(),])));