Set Pass Screen

This commit is contained in:
hanie.khodkari
2025-04-29 17:10:09 +03:30
parent bb1adc81ec
commit ff0931048e
6 changed files with 301 additions and 251 deletions
+9 -4
View File
@@ -82,7 +82,8 @@ class Auth with ChangeNotifier {
}
}
Future<String> sendRePass(String password, String token) async {
Future<String> sendRePass(
String password, String passwordConfirmation, String token) async {
print(password);
print(token);
@@ -90,9 +91,12 @@ class Auth with ChangeNotifier {
Uri.parse(Url.sendResetPass),
body: {
'password': password,
'password_confirmation': password,
'password_confirmation': passwordConfirmation,
},
headers: {
'Authorization': User.token,
// 'X-Requested-With': 'XMLHttpRequest',
},
headers: {'Authorization': token, 'X-Requested-With': 'XMLHttpRequest'},
// headers: {'X-Requested-With': 'XMLHttpRequest'},
);
final responseData = json.decode(response.body);
@@ -102,7 +106,8 @@ class Auth with ChangeNotifier {
// return 'Done';
// }
print(responseData);
if (responseData['status'] == 'Success') {
if (responseData['status'] == 'Success' &&
responseData['message'] == 'Success Change Password') {
return 'done';
} else {
return 'error';