diff --git a/lib/components/newsletter.dart b/lib/components/newsletter.dart index b517927..fc85581 100644 --- a/lib/components/newsletter.dart +++ b/lib/components/newsletter.dart @@ -84,6 +84,7 @@ class _NewsletterState extends State { 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 { ); } ); - } else { - } }); } diff --git a/lib/components/search_form.dart b/lib/components/search_form.dart index 68ef637..6ba2ebe 100644 --- a/lib/components/search_form.dart +++ b/lib/components/search_form.dart @@ -58,6 +58,7 @@ class _SearchFormState extends State { MaterialPageRoute( builder: (context) => SearchPage(query: searchController.text))); + searchController.clear(); }, child: const Text('Search'), ),