RepoSelector: Allow text to be easily cleared

This commit is contained in:
Vishesh Handa
2020-05-18 23:09:14 +02:00
parent 5133dfadf7
commit 630b4896e6

View File

@ -136,9 +136,13 @@ class GitHostSetupRepoSelectorState extends State<GitHostSetupRepoSelector> {
var textField = TextField( var textField = TextField(
controller: _textController, controller: _textController,
maxLines: 1, maxLines: 1,
decoration: const InputDecoration( decoration: InputDecoration(
hintText: 'Type to Search or Create a Repo', hintText: 'Type to Search or Create a Repo',
border: OutlineInputBorder(), border: const OutlineInputBorder(),
suffixIcon: IconButton(
onPressed: () => _textController.clear(),
icon: Icon(Icons.clear),
),
), ),
); );