|
|
|
@ -54,6 +54,17 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
AuthProvider authProvider;
|
|
|
|
|
bool isLoading = false;
|
|
|
|
|
ProjectProvider projectsProvider;
|
|
|
|
|
var _isInit = true;
|
|
|
|
|
|
|
|
|
|
void didChangeDependencies() {
|
|
|
|
|
super.didChangeDependencies();
|
|
|
|
|
if (_isInit) {
|
|
|
|
|
projectsProvider = Provider.of<ProjectProvider>(context);
|
|
|
|
|
projectsProvider.getDoctorClinicsList();
|
|
|
|
|
}
|
|
|
|
|
_isInit = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BuildContext myContext;
|
|
|
|
|
|
|
|
|
|
GlobalKey _one = GlobalKey();
|
|
|
|
@ -64,7 +75,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
hospitalProvider = Provider.of(context);
|
|
|
|
|
authProvider = Provider.of(context);
|
|
|
|
|
projectsProvider = Provider.of(context);
|
|
|
|
|
print(authProvider.doctorsClinicList);
|
|
|
|
|
FocusScopeNode currentFocus = FocusScope.of(context);
|
|
|
|
|
if (!currentFocus.hasPrimaryFocus) {
|
|
|
|
|
currentFocus.unfocus();
|
|
|
|
@ -95,7 +105,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
|
),
|
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
|
alignment: projectsProvider.isArabic
|
|
|
|
|
? Alignment.topRight
|
|
|
|
|
: Alignment.topLeft,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
@ -106,8 +118,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
showCupertinoPicker(
|
|
|
|
|
context: context,
|
|
|
|
|
actionList: authProvider.doctorsClinicList);
|
|
|
|
|
decKey: '',context: context,
|
|
|
|
|
actionList: projectsProvider.doctorClinicsList);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
margin:
|
|
|
|
@ -304,7 +316,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
TranslationBase.of(context).patientServices,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
|
alignment: projectsProvider.isArabic
|
|
|
|
|
? Alignment.topRight
|
|
|
|
|
: Alignment.topLeft,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
@ -532,19 +546,17 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
CupertinoButton(
|
|
|
|
|
child: Text(
|
|
|
|
|
'Cancel'.toUpperCase(),
|
|
|
|
|
// style: TextStyle(context)
|
|
|
|
|
),
|
|
|
|
|
child: Text(TranslationBase.of(context).cancel
|
|
|
|
|
// style: TextStyle(context)
|
|
|
|
|
),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
CupertinoButton(
|
|
|
|
|
child: Text(
|
|
|
|
|
'Done'.toUpperCase(),
|
|
|
|
|
// style: textStyle(context),
|
|
|
|
|
),
|
|
|
|
|
child: Text(TranslationBase.of(context).done
|
|
|
|
|
// style: textStyle(context),
|
|
|
|
|
),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
// onSelectFun(cupertinoPickerIndex);
|
|
|
|
@ -558,14 +570,19 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
color: Color(0xfff7f7f7),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: actionList
|
|
|
|
|
.map((e) => Container(
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () =>
|
|
|
|
|
changeClinic(e.clinicID, context),
|
|
|
|
|
child: Text(
|
|
|
|
|
e.clinicName,
|
|
|
|
|
style: TextStyle(fontSize: 15),
|
|
|
|
|
)),
|
|
|
|
|
.map((e) => Flexible(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () =>
|
|
|
|
|
changeClinic(e.clinicID, context),
|
|
|
|
|
child: Text(
|
|
|
|
|
e.clinicName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
1.9),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
.toList(),
|
|
|
|
|
))
|
|
|
|
|