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: () {
|
||||
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();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue