Answers for "Out of focus in TextField when pressing the screen flutter"

3

flutter unfocus textfield when click outside

return GestureDetector(
      onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
      child: Scaffold(
        appBar: AppBar(
          title: Text('Login'),
        ),
        body: Body(),
      ),
    );
Posted by: Guest on June-18-2021
2

flutter unfocus textfield

FocusScope.of(context).unfocus();
Posted by: Guest on October-12-2020

Code answers related to "Out of focus in TextField when pressing the screen flutter"

Browse Popular Code Answers by Language