Other Changes

This commit is contained in:
fhkhd
2024-02-02 20:54:16 +03:30
parent 725b8dc30b
commit 0f79e82c67
5 changed files with 95 additions and 38 deletions
+35 -2
View File
@@ -102,6 +102,39 @@ class TestResultsProvider with ChangeNotifier {
// notifyListeners();
}
// bool isChangeVerify = false;
// List<String> newVal = [];
// Future<void> setChangeVerify (String id, String value) async {
// // if(await changeVerification(id , value) == true){
// // isChangeVerify = true;
// //
// // // for(var testStatus in testResultData['data']['verified']){
// // // var iii = 0;
// // // newVal.add(testStatus.toString());
// // // print("i is : $iii $testStatus.");
// // // iii +1;
// // // }
// // getTestResults();
// // for(var item in items!)
// // newVal.add(item.verified);
// // notifyListeners();
// // }
// }
// void reSetChangeVerify (){
// isChangeVerify = false;
// }
bool isloadingButton = false;
void resetLoadingButton() {
isloadingButton = false;
notifyListeners();
}
void setLoadingButton() {
isloadingButton = true;
notifyListeners();
}
TestResultFilterObject get filters {
return _filters;
}
@@ -217,7 +250,7 @@ class TestResultsProvider with ChangeNotifier {
'Authorization': User.token,
},
);
print(response.body);
var testResultData = json.decode(response.body);
if (pageNumber == 1) {
originalItems = [];
@@ -228,7 +261,7 @@ class TestResultsProvider with ChangeNotifier {
TestResultObject(
id: item['id'].toString(),
name: item['test_type'] != null ? item['test_type']['name'] : '',
deviceId: item['device_id'].toString(),
deviceId: item['device_id'] != null ? item['device_id'].toString() : '',
result: item['result'] == 'Accept' ? 'Accepted' : 'Not Accepted',
date: item['created_at'].toString().substring(0, 10),
hospital: item['user']['medical_center']['name'],