How to make the AnimatedContainer return to its previous state (1) when the keyboard is closed? at the moment changing the location of the container happens via onTap
Widget _formAuth(String labelForm, String labelButton, void func()) {
return AnimatedContainer(
duration: Duration(seconds: 1),
curve: Curves.ease,
margin: EdgeInsets.fromLTRB(13, _marginFormAuth, 13, 50),
Widget _inputLoginOrPassword(
Icon icon, String hint, TextEditingController controller, bool obscure) {
return Container(
margin: EdgeInsets.fromLTRB(10, 35, 10, 0),
child: TextField(
onTap: () {
setState(() {
_marginFormAuth = 20;
});
},