clear textfield after submit
This commit is contained in:
parent
6393d1a053
commit
2d3de88fc6
2 changed files with 2 additions and 2 deletions
|
@ -84,6 +84,7 @@ class _NewsletterState extends State<Newsletter> {
|
|||
onPressed: () {
|
||||
if (emailController.text.isNotEmpty) {
|
||||
subscribe(emailController.text).then((status) {
|
||||
emailController.clear();
|
||||
if (status == 200) {
|
||||
return showDialog(
|
||||
context: context,
|
||||
|
@ -112,8 +113,6 @@ class _NewsletterState extends State<Newsletter> {
|
|||
);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ class _SearchFormState extends State<SearchForm> {
|
|||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
SearchPage(query: searchController.text)));
|
||||
searchController.clear();
|
||||
},
|
||||
child: const Text('Search'),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue