diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 108205bf..40d9a06a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -13,11 +13,72 @@ PODS: - Flutter - device_info (0.0.1): - Flutter + - Firebase/CoreOnly (6.33.0): + - FirebaseCore (= 6.10.3) + - Firebase/Messaging (6.33.0): + - Firebase/CoreOnly + - FirebaseMessaging (~> 4.7.0) + - firebase_core (0.5.3): + - Firebase/CoreOnly (~> 6.33.0) + - Flutter + - firebase_core_web (0.1.0): + - Flutter + - firebase_messaging (7.0.3): + - Firebase/CoreOnly (~> 6.33.0) + - Firebase/Messaging (~> 6.33.0) + - firebase_core + - Flutter + - FirebaseCore (6.10.3): + - FirebaseCoreDiagnostics (~> 1.6) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Logger (~> 6.7) + - FirebaseCoreDiagnostics (1.7.0): + - GoogleDataTransport (~> 7.4) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Logger (~> 6.7) + - nanopb (~> 1.30906.0) + - FirebaseInstallations (1.7.0): + - FirebaseCore (~> 6.10) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) + - PromisesObjC (~> 1.2) + - FirebaseInstanceID (4.8.0): + - FirebaseCore (~> 6.10) + - FirebaseInstallations (~> 1.6) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) + - FirebaseMessaging (4.7.1): + - FirebaseCore (~> 6.10) + - FirebaseInstanceID (~> 4.7) + - GoogleUtilities/AppDelegateSwizzler (~> 6.7) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Reachability (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) + - Protobuf (>= 3.9.2, ~> 3.9) - Flutter (1.0.0) - flutter_flexible_toast (0.0.1): - Flutter - flutter_plugin_android_lifecycle (0.0.1): - Flutter + - GoogleDataTransport (7.5.1): + - nanopb (~> 1.30906.0) + - GoogleUtilities/AppDelegateSwizzler (6.7.2): + - GoogleUtilities/Environment + - GoogleUtilities/Logger + - GoogleUtilities/Network + - GoogleUtilities/Environment (6.7.2): + - PromisesObjC (~> 1.2) + - GoogleUtilities/Logger (6.7.2): + - GoogleUtilities/Environment + - GoogleUtilities/Network (6.7.2): + - GoogleUtilities/Logger + - "GoogleUtilities/NSData+zlib" + - GoogleUtilities/Reachability + - "GoogleUtilities/NSData+zlib (6.7.2)" + - GoogleUtilities/Reachability (6.7.2): + - GoogleUtilities/Logger + - GoogleUtilities/UserDefaults (6.7.2): + - GoogleUtilities/Logger - hexcolor (0.0.1): - Flutter - imei_plugin (0.0.1): @@ -27,6 +88,11 @@ PODS: - maps_launcher (0.0.1): - Flutter - MTBBarcodeScanner (5.0.11) + - nanopb (1.30906.0): + - nanopb/decode (= 1.30906.0) + - nanopb/encode (= 1.30906.0) + - nanopb/decode (1.30906.0) + - nanopb/encode (1.30906.0) - OpenTok (2.15.3) - path_provider_linux (0.0.1): - Flutter @@ -34,6 +100,8 @@ PODS: - Flutter - "permission_handler (5.0.1+1)": - Flutter + - PromisesObjC (1.2.10) + - Protobuf (3.13.0) - Reachability (3.2) - shared_preferences (0.0.1): - Flutter @@ -68,6 +136,9 @@ DEPENDENCIES: - connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`) - connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`) - device_info (from `.symlinks/plugins/device_info/ios`) + - firebase_core (from `.symlinks/plugins/firebase_core/ios`) + - firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`) + - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - Flutter (from `Flutter`) - flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`) - flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`) @@ -94,8 +165,19 @@ DEPENDENCIES: SPEC REPOS: trunk: - Alamofire + - Firebase + - FirebaseCore + - FirebaseCoreDiagnostics + - FirebaseInstallations + - FirebaseInstanceID + - FirebaseMessaging + - GoogleDataTransport + - GoogleUtilities - MTBBarcodeScanner + - nanopb - OpenTok + - PromisesObjC + - Protobuf - Reachability - SwiftProtobuf - Try @@ -111,6 +193,12 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/connectivity_macos/ios" device_info: :path: ".symlinks/plugins/device_info/ios" + firebase_core: + :path: ".symlinks/plugins/firebase_core/ios" + firebase_core_web: + :path: ".symlinks/plugins/firebase_core_web/ios" + firebase_messaging: + :path: ".symlinks/plugins/firebase_messaging/ios" Flutter: :path: Flutter flutter_flexible_toast: @@ -161,18 +249,32 @@ SPEC CHECKSUMS: connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191 device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 + Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5 + firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659 + firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1 + firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75 + FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd + FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1 + FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2 + FirebaseInstanceID: bd3ffc24367f901a43c063b36c640b345a4a5dd1 + FirebaseMessaging: 5eca4ef173de76253352511aafef774caa1cba2a Flutter: 0e3d915762c693b495b44d77113d4970485de6ec flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143 flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35 + GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833 + GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89 imei_plugin: cb1af7c223ac2d82dcd1457a7137d93d65d2a3cd local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd maps_launcher: eae38ee13a9c3f210fa04e04bb4c073fa4c6ed92 MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb + nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc OpenTok: fde03ecc5ea31fe0a453242847c4ee1f47e1d735 path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6 + PromisesObjC: b14b1c6b68e306650688599de8a45e49fae81151 + Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78 diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 8787eb42..78a27f7e 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -70,7 +70,7 @@ class _DashboardScreenState extends State { DEVICE_TOKEN = token; var request = await sharedPref.getObj(DOCTOR_PROFILE); authProvider.insertDeviceImei(request).then((value) { - print(value['ReturnValue']); + // print(value['ReturnValue']); changeIsLoading(false); }); } diff --git a/lib/widgets/patients/profile/patient-page-header-widget.dart b/lib/widgets/patients/profile/patient-page-header-widget.dart index fd7fd0d8..dd2698a9 100644 --- a/lib/widgets/patients/profile/patient-page-header-widget.dart +++ b/lib/widgets/patients/profile/patient-page-header-widget.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; @@ -29,6 +30,12 @@ class PatientPageHeaderWidget extends StatelessWidget { doctorID: '', editedBy: ''); await model.getPatientAllergy(generalGetReqForSOAP); + if (model.allergiesList.length == 0) { + await model.getMasterLookup(MasterKeysService.Allergies); + } + if (model.allergySeverityList.length == 0) { + await model.getMasterLookup(MasterKeysService.AllergySeverity); + } }, builder: (_, model, w) => Container( @@ -84,14 +91,11 @@ class PatientPageHeaderWidget extends StatelessWidget { ), ], ), - NetworkBaseView( - baseViewModel: model, - child: model.patientAllergiesList.isNotEmpty ?AppText( - TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic), - color: Color(0xFFB9382C), - fontWeight: FontWeight.bold, - ) : AppText(''), - ), + model.patientAllergiesList.isNotEmpty ?AppText( + TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic), + color: Color(0xFFB9382C), + fontWeight: FontWeight.bold, + ) : AppText(''), ], ), ) diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index c998f932..6f058792 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -30,6 +30,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class UpdateSubjectivePage extends StatefulWidget { final Function changePageViewIndex; + final Function changeLoadingState; final List myAllergiesList; final List myHistoryList; final PatiantInformtion patientInfo; @@ -39,7 +40,7 @@ class UpdateSubjectivePage extends StatefulWidget { this.changePageViewIndex, this.myAllergiesList, this.myHistoryList, - this.patientInfo}); + this.patientInfo, this.changeLoadingState}); @override _UpdateSubjectivePageState createState() => _UpdateSubjectivePageState(); @@ -53,6 +54,7 @@ class _UpdateSubjectivePageState extends State { TextEditingController complaintsController = TextEditingController(); final formKey = GlobalKey(); getHistory(SOAPViewModel model) async{ + widget.changeLoadingState(true); GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel( patientMRN: widget.patientInfo.patientMRN, episodeID: widget.patientInfo.episodeNo.toString(), @@ -206,10 +208,13 @@ class _UpdateSubjectivePageState extends State { await getHistory(model); await getAllergies(model); + + widget.changeLoadingState(false); + }, builder: (_, model, w) => AppScaffold( isShowAppBar: false, - baseViewModel: model, + // baseViewModel: model, body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( @@ -463,6 +468,7 @@ class _UpdateSubjectivePageState extends State { helpers.showErrorToast(model.error); } } + widget.changeLoadingState(true); widget.changePageViewIndex(1); diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart index 93d56af2..05813d82 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -29,11 +29,12 @@ class UpdateAssessmentPage extends StatefulWidget { final Function changePageViewIndex; List mySelectedAssessmentList; final PatiantInformtion patientInfo; + final Function changeLoadingState; UpdateAssessmentPage({Key key, this.changePageViewIndex, this.mySelectedAssessmentList, - this.patientInfo}); + this.patientInfo, this.changeLoadingState}); @override _UpdateAssessmentPageState createState() => _UpdateAssessmentPageState(); @@ -92,10 +93,13 @@ class _UpdateAssessmentPageState extends State { widget.mySelectedAssessmentList.add(temMySelectedAssessment); }); } + + widget.changeLoadingState(false); + }, builder: (_, model, w) => AppScaffold( isShowAppBar: false, - baseViewModel: model, + // baseViewModel: model, body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( @@ -366,6 +370,8 @@ class _UpdateAssessmentPageState extends State { loading: model.state == ViewState.BusyLocal, onPressed: () async { widget.changePageViewIndex(3); + widget.changeLoadingState(true); + }, ), SizedBox( diff --git a/lib/widgets/patients/profile/soap_update/update_objective_page.dart b/lib/widgets/patients/profile/soap_update/update_objective_page.dart index ab1abd21..fe80a5c3 100644 --- a/lib/widgets/patients/profile/soap_update/update_objective_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_objective_page.dart @@ -29,10 +29,12 @@ import 'package:provider/provider.dart'; class UpdateObjectivePage extends StatefulWidget { final Function changePageViewIndex; + final Function changeLoadingState; + final List mySelectedExamination; final PatiantInformtion patientInfo; UpdateObjectivePage( - {Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo}); + {Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, this.changeLoadingState}); @override _UpdateObjectivePageState createState() => _UpdateObjectivePageState(); @@ -87,10 +89,13 @@ class _UpdateObjectivePageState extends State { widget.mySelectedExamination.add(tempEam); }); } + + widget.changeLoadingState(false); }, builder: (_, model, w) => AppScaffold( isShowAppBar: false, - baseViewModel: model, + // baseViewModel: model, + body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( @@ -402,9 +407,13 @@ class _UpdateObjectivePageState extends State { if (model.state == ViewState.ErrorLocal) { helpers.showErrorToast(model.error); } else { + widget.changeLoadingState(true); + widget.changePageViewIndex(2); } } else { + widget.changeLoadingState(true); + widget.changePageViewIndex(2); // helpers.showErrorToast(TranslationBase.of(context).requiredMsg); diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index a3c2cdd2..d0e91c8d 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -21,8 +21,9 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class UpdatePlanPage extends StatefulWidget { final Function changePageViewIndex; final PatiantInformtion patientInfo; + final Function changeLoadingState; - UpdatePlanPage({Key key, this.changePageViewIndex, this.patientInfo}); + UpdatePlanPage({Key key, this.changePageViewIndex, this.patientInfo, this.changeLoadingState}); @override _UpdatePlanPageState createState() => _UpdatePlanPageState(); @@ -64,9 +65,10 @@ class _UpdatePlanPageState extends State { progressNoteController.text = helpers .parseHtmlString(model.patientProgressNoteList[0].planNote); } + widget.changeLoadingState(false); }, builder: (_, model, w) => AppScaffold( - baseViewModel: model, + // baseViewModel: model, isShowAppBar: false, body: SingleChildScrollView( physics: ScrollPhysics(), diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index 84b8cc61..8235f55a 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -1,5 +1,4 @@ import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; @@ -7,8 +6,8 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_objective_page.dart'; @@ -30,7 +29,7 @@ class _UpdateSoapIndexState extends State with TickerProviderStateMixin { PageController _controller; int _currentIndex = 0; - List myAllergiesList= List(); + List myAllergiesList = List(); List myHistoryList = List(); List mySelectedExamination = List(); List mySelectedAssessment = List(); @@ -38,6 +37,8 @@ class _UpdateSoapIndexState extends State _controller.jumpToPage(pageIndex); } + bool _isLoading = true; + @override void initState() { // TODO: implement initState @@ -45,13 +46,21 @@ class _UpdateSoapIndexState extends State super.initState(); } + + void changeLoadingState(isLoading) { + setState(() { + _isLoading = isLoading; + }); + } + @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; return BaseView( builder: (_, model, w) => AppScaffold( - baseViewModel: model, + // baseViewModel: model, + isLoading: _isLoading, appBarTitle: TranslationBase.of(context).healthRecordInformation, body: SingleChildScrollView( child: Column( @@ -97,22 +106,28 @@ class _UpdateSoapIndexState extends State myAllergiesList: myAllergiesList, myHistoryList: myHistoryList, patientInfo: patient, + changeLoadingState:changeLoadingState ), UpdateObjectivePage( changePageViewIndex: changePageViewIndex, mySelectedExamination: mySelectedExamination, patientInfo: patient, + changeLoadingState:changeLoadingState ), UpdateAssessmentPage( changePageViewIndex: changePageViewIndex, mySelectedAssessmentList: mySelectedAssessment, patientInfo: patient, + changeLoadingState:changeLoadingState + ), UpdatePlanPage( changePageViewIndex: changePageViewIndex, patientInfo: patient, + changeLoadingState:changeLoadingState + ) ], ), diff --git a/lib/widgets/shared/loader/gif_loader_container.dart b/lib/widgets/shared/loader/gif_loader_container.dart index b7a20339..b2c2224b 100644 --- a/lib/widgets/shared/loader/gif_loader_container.dart +++ b/lib/widgets/shared/loader/gif_loader_container.dart @@ -34,6 +34,7 @@ class _GifLoaderContainerState extends State child: Container( // margin: EdgeInsets.only(bottom: 40), child: GifImage( + controller: controller1, image: AssetImage( "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), diff --git a/lib/widgets/shared/network_base_view.dart b/lib/widgets/shared/network_base_view.dart index fbd05870..b8db1546 100644 --- a/lib/widgets/shared/network_base_view.dart +++ b/lib/widgets/shared/network_base_view.dart @@ -27,10 +27,7 @@ class NetworkBaseView extends StatelessWidget { return child; break; case ViewState.Busy: - return Padding( - padding: const EdgeInsets.all(8.0), - child: Center(child: const CircularProgressIndicator()), - ); + return AppLoaderWidget(); break; case ViewState.Error: return Center(