|
|
|
|
@ -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(
|
|
|
|
|
|