check if special in home page

merge-requests/742/head
Elham Rababah 5 years ago
parent 37e6853976
commit 3cf4ef4348

@ -103,15 +103,15 @@ class DashboardViewModel extends BaseViewModel {
} }
bool isSpecialClinic(clinicId){ GetSpecialClinicalCareListResponseModel getSpecialClinic(clinicId){
bool isSpecial = false; GetSpecialClinicalCareListResponseModel special ;
specialClinicalCareList.forEach((element) { specialClinicalCareList.forEach((element) {
if(element.clinicID == 1){ if(element.clinicID == 1){
isSpecial = true; special = element;
} }
}); });
return isSpecial; return special;
} }
} }

@ -288,7 +288,7 @@ class _HomeScreenState extends State<HomeScreen> {
child: ListView( child: ListView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: [ children: [
...homePatientsCardsWidget(model), ...homePatientsCardsWidget(model, projectsProvider),
])), ])),
SizedBox( SizedBox(
height: 20, height: 20,
@ -306,7 +306,7 @@ class _HomeScreenState extends State<HomeScreen> {
); );
} }
List<Widget> homePatientsCardsWidget(DashboardViewModel model) { List<Widget> homePatientsCardsWidget(DashboardViewModel model,projectsProvider) {
colorIndex = 0; colorIndex = 0;
List<Color> backgroundColors = List(3); List<Color> backgroundColors = List(3);
@ -355,7 +355,8 @@ class _HomeScreenState extends State<HomeScreen> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: PatientInPatientScreen(specialClinic: model.specialClinicalCareList[0],), page: PatientInPatientScreen(specialClinic: model.getSpecialClinic(clinicId??projectsProvider
.doctorClinicsList[0].clinicID),),
), ),
); );
}, },

Loading…
Cancel
Save