From 9fecf8e89f186320ed21510fe46357738d5b294b Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 9 Dec 2020 10:34:02 +0200 Subject: [PATCH] fix insurance update --- .../FamilyFiles/GetAllSharedRecordByStatusResponse.dart | 4 ++-- lib/pages/insurance/insurance_update_screen.dart | 6 ++++-- lib/splashPage.dart | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart index b21d940f..750cf0be 100644 --- a/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart +++ b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart @@ -25,7 +25,7 @@ class GetAllSharedRecordsByStatusResponse { dynamic successMsgN; dynamic doctorInformationList; List getAllPendingRecordsList; - List getAllSharedRecordsByStatusList; + List getAllSharedRecordsByStatusList = List(); List getResponseFileList; bool isHMGPatient; bool isLoginSuccessfully; @@ -92,7 +92,7 @@ class GetAllSharedRecordsByStatusResponse { this.successMsgN, this.doctorInformationList, this.getAllPendingRecordsList, - this.getAllSharedRecordsByStatusList, + this.getAllSharedRecordsByStatusList , this.getResponseFileList, this.isHMGPatient, this.isLoginSuccessfully, diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart index 1e616108..f2f66031 100644 --- a/lib/pages/insurance/insurance_update_screen.dart +++ b/lib/pages/insurance/insurance_update_screen.dart @@ -97,7 +97,9 @@ class _InsuranceUpdateState extends State controller: _tabController, children: [ Container( - child: ListView.builder( + child: + model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList!=null? + ListView.builder( itemCount: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.length, itemBuilder: (BuildContext context, int index) { return Container( @@ -173,7 +175,7 @@ class _InsuranceUpdateState extends State ), ), ); - }), + }):Container(), ), Container( child: ListView.builder( diff --git a/lib/splashPage.dart b/lib/splashPage.dart index d367d3ec..2c12d6fd 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -42,9 +42,9 @@ class _SplashScreenState extends State { var data = await sharedPref.getObject(USER_PROFILE); if (data != null) { AuthenticatedUser userData = AuthenticatedUser.fromJson(data); - Provider.of(context, listen: false).isLogin = true; - authenticatedUserObject.isLogin = true; - authenticatedUserObject.user = userData; + // Provider.of(context, listen: false).isLogin = true; + //authenticatedUserObject.isLogin = true; + //authenticatedUserObject.user = userData; } }