Fix subscribe
This commit is contained in:
parent
cea5544c40
commit
20ea2c0222
1 changed files with 4 additions and 2 deletions
|
@ -83,8 +83,8 @@ class _NewsletterState extends State<Newsletter> {
|
||||||
)),
|
)),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (emailController.text.isNotEmpty) {
|
if (emailController.text.isNotEmpty) {
|
||||||
subscribe(emailController.text).then((status) {
|
var emailQuery = emailController.text;
|
||||||
emailController.clear();
|
subscribe(emailQuery).then((status) {
|
||||||
if (status == 200) {
|
if (status == 200) {
|
||||||
return showDialog(
|
return showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -114,6 +114,8 @@ class _NewsletterState extends State<Newsletter> {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emailController.clear();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue