This commit is contained in:
erfan
2021-01-06 11:57:21 +03:30
parent 20cc775bc1
commit 2c045f43f1
12 changed files with 302 additions and 119 deletions
+5 -4
View File
@@ -37,7 +37,7 @@ class _RePassScreenState extends State<RePassScreen> {
super.didChangeDependencies();
}
Future<void> _showDialog(String message) async{
Future<void> _showDialog(String message) async {
await showDialog(
context: context,
builder: (ctx) => AlertDialog(
@@ -62,11 +62,12 @@ class _RePassScreenState extends State<RePassScreen> {
setState(() {
_isLoading = true;
});
await Provider.of<Auth>(context)
await Provider.of<Auth>(context, listen: false)
.sendRePass(passwordController.text, token)
.then((value) async{
.then((value) async {
if (value == 'done') {
await _showDialog('Password changed successfully.Now login to your account.');
await _showDialog(
'Password changed successfully.Now login to your account.');
Navigator.of(context).pop();
}
});