У меня есть BottomNavigationBar, в котором есть текстовое поле, которое требует ввода данных от пользователя. Когда я нажимаю на текстовое поле, клавиатура закрывает всю половину экрана, а текстовое поле скрывается за клавиатурой и его не видно. Я хочу переместить текстовое поле над клавиатурой, чтобы улучшить пользовательский интерфейс.
это код BottomNavigationBar:
Код: Выделить всё
Widget build(BuildContext context) {
return Container(
color: Colors.grey[200],
height: 70,
child: Row(
children: [
SizedBox(
height: MediaQuery.of(context).viewInsets.bottom,
),
Container(
width: MediaQuery.of(context).size.width * 0.6,
color: Colors.transparent,
margin: EdgeInsets.fromLTRB(40, 0, 0, 0),
child: TextField( //this is the TextField
style: TextStyle(
fontSize: 30,
fontFamily: 'Karla',
),
decoration: InputDecoration.collapsed(
hintText: 'Experimez-vous...',
hintStyle: TextStyle(color: Colors.black),
),
),
),
],
),
);
Код: Выделить всё
return Scaffold(
body: Column(
children: [
CloseButtonScreen(),
Container(
color: Colors.transparent,
child: HeaderContent(),
),
ContainerListItems(),
],
),
bottomNavigationBar: BottomNavBar(), //this is where Im calling my BottomNavigationBar from
floatingActionButton: FloatingActionBtn(),
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
resizeToAvoidBottomPadding: false,
);
текстовое поле находится за клавиатурой в нижней панели навигации.

ЭКСПЕРИМИЗИРУЙТЕ С текстовым полем< /p>

Подробнее здесь: https://stackoverflow.com/questions/609 ... -to-edit-i