Fix subscribe

This commit is contained in:
Moe Poi ~ 2022-05-17 15:33:00 +07:00
parent cea5544c40
commit 20ea2c0222

View file

@ -83,8 +83,8 @@ class _NewsletterState extends State<Newsletter> {
)),
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<Newsletter> {
}
);
}
emailController.clear();
});
}
},