Я новичок в трепетании. Я застрял в одном месте и не могу найти точное решение.
У меня есть BottomNavigationBar, в котором у меня есть текстовое поле, которое требует ввода от пользователя. Когда я нажимаю на текстовое поле, клавиатура закрывает всю половину экрана, а текстовое поле прячется за клавиатурой и не может быть видно. Я хочу переместить текстовое поле над клавиатурой для лучшего пользовательского интерфейса.
это код BottomNavigationBar:
Widget build(BuildContext context) {
return Container(
color: Colors.grey[200],
height: 70,
child: Row(
children: <Widget>[
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),
),
),
),
],
),
);
Это основная часть (Scaffold), из которой я его вызываю:
return Scaffold(
body: Column(
children: <Widget>[
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,
);
снимки экрана:
текстовое поле находится за клавиатурой в нижней навигационной панели

EXPERIMEZ VOUS текстовое поле
