Show error dialog on registration blocked error

This commit is contained in:
Vishnu Mohandas 2020-11-17 11:48:46 +05:30
parent d8f786cc07
commit 6f8a1a5427

View file

@ -36,14 +36,22 @@ class UserService {
_logger.severe(e);
}).then((response) async {
await dialog.hide();
if (response != null && response.statusCode == 200) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return OTTVerificationPage();
},
),
);
if (response != null) {
if (response.statusCode == 200) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return OTTVerificationPage();
},
),
);
} else if (response.statusCode == 403) {
showErrorDialog(
context,
"Please wait...",
"We are currently not accepting new registrations. You have been added to the waitlist and we will let you know once we are ready for you.",
);
}
} else {
showGenericErrorDialog(context);
}