Answers for "error textfield getting clear flutter"

1

flutter clear all text in textfield

TextField(
  controller: _controller,
  decoration: InputDecoration(
    hintText: "Enter a message",
    suffixIcon: IconButton(
      onPressed: () => _controller.clear(),
      icon: Icon(Icons.clear),
    ),
  ),
)
Posted by: Guest on July-01-2020
0

error textfield getting clear flutter

The issue is that you are persisting objects inside a StatelessWidget.

Opening the keyboard tends to rebuild the whole screen (which is fine). But in
my case rebuilding cause your TextEditingController to be GCed because i 
stored them inside a StatelessWidget
Posted by: Guest on July-11-2021

Code answers related to "error textfield getting clear flutter"

Browse Popular Code Answers by Language