check if special in home page

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

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

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

Loading…
Cancel
Save