diff --git a/lib/components/newsletter.dart b/lib/components/newsletter.dart index fc85581..6c1d529 100644 --- a/lib/components/newsletter.dart +++ b/lib/components/newsletter.dart @@ -83,8 +83,8 @@ class _NewsletterState extends State { )), onPressed: () { if (emailController.text.isNotEmpty) { - subscribe(emailController.text).then((status) { - emailController.clear(); + var emailQuery = emailController.text; + subscribe(emailQuery).then((status) { if (status == 200) { return showDialog( context: context, @@ -114,6 +114,8 @@ class _NewsletterState extends State { } ); } + + emailController.clear(); }); } },