I have the following code:
return Scaffold(
appBar: AppBar(
title: Text('Sample Code'),
),
body: ListView(
padding: const EdgeInsets.all(20.0),
children: <Widget>[
TextField(
decoration: InputDecoration(labelText: "Text"),
),
TextField(
decoration: InputDecoration(labelText: "Text"),
),
TextField(
decoration: InputDecoration(labelText: "Text"),
),
],
),
bottomNavigationBar: BottomAppBar(
child: Container(
height: 50.0,
),
),
floatingActionButton: FloatingActionButton(
onPressed: () {},
child: Icon(Icons.add),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
);
Whenever the keyboard shows up to enter text into a TextField the FloatingActionButton moves up to the top of the keyboard which will look like this:
What I want is that the button stays in the bottom navigation bar and does not move when the keyboard shows up. I added resizeToAvoidBottomPadding: false, to the Scaffold, which prevents the button from moving but also stops my ListView from moving to stay visible when the keyboard shows up.
