dashboard issue

merge-requests/326/head
Sultan Khan 5 years ago
parent 87c27173c4
commit 332caaae2f

@ -738,4 +738,5 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "A Sick leave is on Hold status for this patient",
'ar': "الإجازة المرضية في حالة الانتظار لهذا المريض"
},
'no-clinic': {'en': "No Clinic", 'ar': "لا عيادة"}
};

@ -62,7 +62,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
bool isExpanded = false;
String isInpatient = "";
var clinicName = [];
var clinicId = 1;
var clinicId;
void didChangeDependencies() async {
super.didChangeDependencies();
if (_isInit) {
@ -144,43 +144,50 @@ class _DashboardScreenState extends State<DashboardScreen> {
Container(
width: MediaQuery.of(context).size.width * .6,
// height: 100,
child: DropdownButtonHideUnderline(
child: DropdownButton(
dropdownColor: Colors.white,
iconEnabledColor: Colors.white,
isExpanded: true,
value: clinicId,
iconSize: 25,
elevation: 16,
selectedItemBuilder: (BuildContext context) {
return projectsProvider.doctorClinicsList
.map((item) {
return Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
AppText(
item.clinicName,
fontSize: SizeConfig.textMultiplier * 2.1,
color: Colors.white,
),
],
);
}).toList();
},
onChanged: (newValue) {
clinicId = newValue;
changeClinic(newValue, context);
},
items: projectsProvider.doctorClinicsList.map((item) {
return DropdownMenuItem(
child: Text(
item.clinicName,
textAlign: TextAlign.end,
),
value: item.clinicID,
);
}).toList(),
)),
child: projectsProvider.doctorClinicsList.length > 0
? DropdownButtonHideUnderline(
child: DropdownButton(
dropdownColor: Colors.white,
iconEnabledColor: Colors.white,
isExpanded: true,
value: clinicId == null
? projectsProvider
.doctorClinicsList[0].clinicID
: clinicId,
iconSize: 25,
elevation: 16,
selectedItemBuilder: (BuildContext context) {
return projectsProvider.doctorClinicsList
.map((item) {
return Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
AppText(
item.clinicName,
fontSize:
SizeConfig.textMultiplier * 2.1,
color: Colors.white,
),
],
);
}).toList();
},
onChanged: (newValue) {
clinicId = newValue;
changeClinic(newValue, context);
},
items: projectsProvider.doctorClinicsList
.map((item) {
return DropdownMenuItem(
child: Text(
item.clinicName,
textAlign: TextAlign.end,
),
value: item.clinicID,
);
}).toList(),
))
: AppText(TranslationBase.of(context).noClinic),
),
),
// InkWell(

@ -1118,9 +1118,11 @@ class TranslationBase {
String get admissionRequestSuccessMsg =>
localizedValues['admissionRequestSuccessMsg'][locale.languageCode];
String get infoStatus => localizedValues['infoStatus'][locale.languageCode];
String get doctorResponse => localizedValues['doctorResponse'][locale.languageCode];
String get sickleaveonhold =>
String get doctorResponse =>
localizedValues['doctorResponse'][locale.languageCode];
String get sickleaveonhold =>
localizedValues['sickleaveonhold'][locale.languageCode];
String get noClinic => localizedValues['no-clinic'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save