Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter clear all text in textfield

TextField(
  controller: _controller,
  decoration: InputDecoration(
    hintText: "Enter a message",
    suffixIcon: IconButton(
      onPressed: () => _controller.clear(),
      icon: Icon(Icons.clear),
    ),
  ),
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flutter #clear #text #textfield
ADD COMMENT
Topic
Name
2+4 =