Set Password
This commit is contained in:
@@ -143,10 +143,21 @@ class _OtpPageState extends State<OtpPage> {
|
||||
(either) => either.fold(
|
||||
(f) => AppFlushbar.showAuthFailureToast(context, f),
|
||||
(data) {
|
||||
AppFlushbar.showSuccess(context, data.message);
|
||||
Future.delayed(Duration(milliseconds: 1000), () {
|
||||
context.router.push(CreatePasswordRoute());
|
||||
});
|
||||
if (data.status == "FAILED") {
|
||||
AppFlushbar.showSuccess(context, data.message);
|
||||
Future.delayed(Duration(milliseconds: 1000), () {
|
||||
context.router.replaceAll([LoginRoute()]);
|
||||
});
|
||||
} else {
|
||||
AppFlushbar.showSuccess(context, data.message);
|
||||
Future.delayed(Duration(milliseconds: 1000), () {
|
||||
context.router.push(
|
||||
CreatePasswordRoute(
|
||||
registrationToken: widget.registrationToken,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user