From eb5d2f3def9be9aa3447eded310757922bac4a5d Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 4 Jan 2022 12:11:01 +0200 Subject: [PATCH] small fixes --- lib/screens/doctor/my_schedule_screen.dart | 6 +- .../reschedule-leaves/reschedule_leave.dart | 182 ------------------ 2 files changed, 2 insertions(+), 186 deletions(-) diff --git a/lib/screens/doctor/my_schedule_screen.dart b/lib/screens/doctor/my_schedule_screen.dart index 2f804358..5d058c6d 100644 --- a/lib/screens/doctor/my_schedule_screen.dart +++ b/lib/screens/doctor/my_schedule_screen.dart @@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/doctor/my_schedule_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:flutter/material.dart'; class MyScheduleScreen extends StatelessWidget { @@ -16,10 +17,7 @@ class MyScheduleScreen extends StatelessWidget { isShowAppBar: false, body: model.listDoctorWorkingHoursTable.length == 0 ? Center( - child: AppText( - TranslationBase.of(context).errorNoSchedule, - color: Theme.of(context).errorColor, - ), + child:ErrorMessage(error: TranslationBase.of(context).errorNoSchedule,), ) : Container( padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), diff --git a/lib/screens/reschedule-leaves/reschedule_leave.dart b/lib/screens/reschedule-leaves/reschedule_leave.dart index 62944e47..2c9430d3 100644 --- a/lib/screens/reschedule-leaves/reschedule_leave.dart +++ b/lib/screens/reschedule-leaves/reschedule_leave.dart @@ -132,122 +132,6 @@ class _RescheduleLeaveScreen extends State { widthFactor: 0.9, child: ListView( children: [ - // Container( - // margin: EdgeInsets.all(8), - // decoration: BoxDecoration( - // borderRadius: BorderRadius.all( - // Radius.circular(6.0)), - // border: Border.all( - // width: 1.0, - // color: HexColor("#CCCCCC"))), - // width: double.infinity, - // child: Padding( - // padding: EdgeInsets.only( - // top: SizeConfig.widthMultiplier * 0.9, - // bottom: - // SizeConfig.widthMultiplier * 0.9, - // right: SizeConfig.widthMultiplier * 3, - // left: SizeConfig.widthMultiplier * 3), - // child: Column( - // crossAxisAlignment: - // CrossAxisAlignment.start, - // children: [ - // Row( - // mainAxisSize: MainAxisSize.max, - // children: [ - // Expanded( - // // add Expanded to have your dropdown button fill remaining space - // child: - // DropdownButtonHideUnderline( - // child: new IgnorePointer( - // ignoring: true, - // child: DropdownButton( - // focusColor: - // Colors.grey, - // isExpanded: true, - // dropdownColor: - // Colors.grey, - // value: getClinicName( - // model) ?? - // "", - // iconSize: 0, - // elevation: 16, - // selectedItemBuilder: - // (BuildContext - // context) { - // return model - // .getClinicNameList() - // .map((item) { - // return Row( - // mainAxisSize: - // MainAxisSize - // .max, - // children: < - // Widget>[ - // AppText( - // item, - // fontSize: - // SizeConfig.textMultiplier * - // 2.1, - // color: Colors - // .grey[ - // 500], - // ), - // ], - // ); - // }).toList(); - // }, - // onChanged: - // (newValue) => - // {}, - // items: model - // .getClinicNameList() - // .map((item) { - // return DropdownMenuItem( - // value: item - // .toString(), - // child: Text( - // item, - // textAlign: - // TextAlign - // .end, - // ), - // ); - // }).toList(), - // ))), - // ), - // ], - // ) - // ], - // ), - // )), - - // Container( - // margin: EdgeInsets.all(8), - // decoration: BoxDecoration( - // borderRadius: - // BorderRadius.all(Radius.circular(6.0)), - // border: Border.all( - // width: 1.0, - // color: HexColor("#CCCCCC"))), - // padding: EdgeInsets.all(5), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // new IgnorePointer( - // ignoring: true, - // child: AppTextFormField( - // readOnly: true, - // hintText: profile != null - // ? profile['DoctorName'] - // : "", - // borderColor: Colors.white, - // onSaved: (value) {}, - // inputFormatter: ONLY_NUMBERS)) - // ], - // ), - // ), - Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( @@ -721,11 +605,6 @@ class _RescheduleLeaveScreen extends State { getSelectedDoctor( model2), showSearchBox: true, - // searchBoxDecoration: InputDecoration( - // border: OutlineInputBorder(), - // contentPadding: EdgeInsets.fromLTRB(12, 12, 8, 0), - // labelText: "Search Doctor", - // ), popupTitle: Container( height: 50, decoration: @@ -770,67 +649,6 @@ class _RescheduleLeaveScreen extends State { ), ), ), - // DropdownButtonHideUnderline( - // child: DropdownButton( - // focusColor: Colors.grey, - // isExpanded: true, - // value: doctorID == null - // ? model2 - // .coveringDoctors[0] - // ['doctorID'] - // .toString() - // : doctorID, - // iconSize: 40, - // elevation: 16, - // selectedItemBuilder: - // (BuildContext context) { - // return model2 - // .coveringDoctors - // .map((item) { - // return Row( - // mainAxisSize: - // MainAxisSize.max, - // children: [ - // AppText( - // projectsProvider - // .isArabic - // ? item[ - // 'doctorNameN'] - // : item[ - // 'doctorName'], - // fontSize: SizeConfig - // .textMultiplier * - // 2.1, - // ), - // ], - // ); - // }).toList(); - // }, - // onChanged: (newValue) => { - // setState(() { - // doctorID = newValue; - // }) - // }, - // items: model2 - // .coveringDoctors - // .map((item) { - // return DropdownMenuItem< - // String>( - // value: item['doctorID'] - // .toString(), - // child: Text( - // projectsProvider - // .isArabic - // ? item[ - // 'doctorNameN'] - // : item[ - // 'doctorName'], - // textAlign: - // TextAlign.start, - // ), - // ); - // }).toList(), - // )), ) : SizedBox(), ],