|
|
|
@ -62,6 +62,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
bool isExpanded = false;
|
|
|
|
|
String isInpatient = "";
|
|
|
|
|
var clinicName = [];
|
|
|
|
|
var clinicId = 1;
|
|
|
|
|
void didChangeDependencies() async {
|
|
|
|
|
super.didChangeDependencies();
|
|
|
|
|
if (_isInit) {
|
|
|
|
@ -140,90 +141,139 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ProfileWelcomeWidget(
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
showCupertinoPicker(
|
|
|
|
|
decKey: '',
|
|
|
|
|
context: context,
|
|
|
|
|
actionList: projectsProvider.doctorClinicsList);
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
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>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
showCupertinoPicker(
|
|
|
|
|
decKey: '',
|
|
|
|
|
context: context,
|
|
|
|
|
actionList: projectsProvider
|
|
|
|
|
.doctorClinicsList);
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
child: AppText(
|
|
|
|
|
authProvider.selectedClinicName !=
|
|
|
|
|
null
|
|
|
|
|
? authProvider
|
|
|
|
|
.selectedClinicName
|
|
|
|
|
: authProvider.doctorProfile
|
|
|
|
|
.clinicDescription,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
1.7,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
alignment: projectsProvider.isArabic
|
|
|
|
|
? Alignment.topRight
|
|
|
|
|
: Alignment.topLeft,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 5,
|
|
|
|
|
top: projectsProvider
|
|
|
|
|
.isArabic
|
|
|
|
|
? 0
|
|
|
|
|
: 5,
|
|
|
|
|
right: 10,
|
|
|
|
|
bottom: projectsProvider
|
|
|
|
|
.isArabic
|
|
|
|
|
? 15
|
|
|
|
|
: 7),
|
|
|
|
|
child: Icon(
|
|
|
|
|
DoctorApp.sync_icon,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
size: SizeConfig
|
|
|
|
|
.textMultiplier *
|
|
|
|
|
1.8,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
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(),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// InkWell(
|
|
|
|
|
// onTap: () async {
|
|
|
|
|
// showCupertinoPicker(
|
|
|
|
|
// decKey: '',
|
|
|
|
|
// context: context,
|
|
|
|
|
// actionList: projectsProvider.doctorClinicsList);
|
|
|
|
|
// },
|
|
|
|
|
// child: Row(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// InkWell(
|
|
|
|
|
// onTap: () async {
|
|
|
|
|
// // showCupertinoPicker(
|
|
|
|
|
// // decKey: '',
|
|
|
|
|
// // context: context,
|
|
|
|
|
// // actionList: projectsProvider
|
|
|
|
|
// // .doctorClinicsList);
|
|
|
|
|
// },
|
|
|
|
|
// child:
|
|
|
|
|
// Container(
|
|
|
|
|
// alignment: projectsProvider.isArabic
|
|
|
|
|
// ? Alignment.topRight
|
|
|
|
|
// : Alignment.topLeft,
|
|
|
|
|
// child: Row(
|
|
|
|
|
// mainAxisAlignment:
|
|
|
|
|
// MainAxisAlignment.spaceBetween,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
// child: AppText(
|
|
|
|
|
// authProvider.selectedClinicName !=
|
|
|
|
|
// null
|
|
|
|
|
// ? authProvider
|
|
|
|
|
// .selectedClinicName
|
|
|
|
|
// : authProvider.doctorProfile
|
|
|
|
|
// .clinicDescription,
|
|
|
|
|
// fontSize:
|
|
|
|
|
// SizeConfig.textMultiplier *
|
|
|
|
|
// 1.7,
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
// ),
|
|
|
|
|
// alignment: projectsProvider.isArabic
|
|
|
|
|
// ? Alignment.topRight
|
|
|
|
|
// : Alignment.topLeft,
|
|
|
|
|
// ),
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment:
|
|
|
|
|
// MainAxisAlignment.start,
|
|
|
|
|
// mainAxisSize: MainAxisSize.max,
|
|
|
|
|
// crossAxisAlignment:
|
|
|
|
|
// CrossAxisAlignment.start,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// InkWell(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// margin: EdgeInsets.only(
|
|
|
|
|
// left: 5,
|
|
|
|
|
// top: projectsProvider
|
|
|
|
|
// .isArabic
|
|
|
|
|
// ? 0
|
|
|
|
|
// : 5,
|
|
|
|
|
// right: 10,
|
|
|
|
|
// bottom:
|
|
|
|
|
// projectsProvider
|
|
|
|
|
// .isArabic
|
|
|
|
|
// ? 15
|
|
|
|
|
// : 7),
|
|
|
|
|
// child: Icon(
|
|
|
|
|
// Icons.arrow_drop_down,
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// size: SizeConfig
|
|
|
|
|
// .textMultiplier *
|
|
|
|
|
// 3,
|
|
|
|
|
// )),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
//),
|
|
|
|
|
// ])),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
//]),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.45,
|
|
|
|
@ -1522,7 +1572,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
changeClinic(clinicId, BuildContext context) async {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
changeIsLoading(true);
|
|
|
|
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
|
|
|
|
DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile);
|
|
|
|
|