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
+6 -12
View File
@@ -62,12 +62,10 @@ class Auth with ChangeNotifier {
// return 'Done';
// }
print(responseData);
if (responseData['status']=='Faild') {
if (responseData['status'] == 'Faild') {
return 'wrong';
}
else{
return responseData['access_token'];
} else {
return responseData['access_token'];
}
}
@@ -81,10 +79,7 @@ class Auth with ChangeNotifier {
'password': password,
'password_confirmation': password,
},
headers: {
'Authorization': token,
'X-Requested-With': 'XMLHttpRequest'
},
headers: {'Authorization': token, 'X-Requested-With': 'XMLHttpRequest'},
// headers: {'X-Requested-With': 'XMLHttpRequest'},
);
final responseData = json.decode(response.body);
@@ -94,10 +89,9 @@ class Auth with ChangeNotifier {
// return 'Done';
// }
print(responseData);
if (responseData['status']=='Success') {
if (responseData['status'] == 'Success') {
return 'done';
}
else{
} else {
return 'error';
}
}