diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 6ebb2fc8..4998e99c 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/core/model/search_drug/get_medication_respons import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -124,7 +125,10 @@ class _MedicineSearchState extends State { return AppScaffold( // baseViewModel: model, isShowAppBar: true, - appBarTitle: TranslationBase.of(context).searchMedicine, + appBar: PatientSearchHeader( + title: TranslationBase.of(context).searchMedicine, + ), + //appBarTitle: TranslationBase.of(context).searchMedicine + "6", body: SingleChildScrollView( child: FractionallySizedBox( widthFactor: 0.97, diff --git a/lib/screens/patients/In_patient/InPatientHeader.dart b/lib/screens/patients/In_patient/InPatientHeader.dart index f2d0f74e..16083b84 100644 --- a/lib/screens/patients/In_patient/InPatientHeader.dart +++ b/lib/screens/patients/In_patient/InPatientHeader.dart @@ -37,15 +37,16 @@ class InPatientHeader extends StatelessWidget with PreferredSizeWidget { child: Row(children: [ IconButton( icon: Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, + color: Color(0xFF2B353E), //Colors.black, onPressed: () => Navigator.pop(context), ), Expanded( child: AppText( TranslationBase.of(context).inPatient, - fontSize: SizeConfig.textMultiplier * 2.8, - fontWeight: FontWeight.bold, + fontSize: 24.0, + fontWeight: FontWeight.w700, color: Color(0xFF2B353E), + letterSpacing: -1.44, ), ), if (model.specialClinicalCareMappingList.isNotEmpty && @@ -53,71 +54,72 @@ class InPatientHeader extends StatelessWidget with PreferredSizeWidget { activeTab != 2) Container( width: MediaQuery.of(context).size.width * .3, - child - : DropdownButtonHideUnderline( - child: DropdownButton( - dropdownColor: Colors.white, - iconEnabledColor: Colors.black, - isExpanded: true, - value: selectedMapId??model.specialClinicalCareMappingList[0].nursingStationID, - iconSize: 25, - elevation: 16, - selectedItemBuilder: (BuildContext context) { - return model.specialClinicalCareMappingList.map((item) { - return Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - padding: EdgeInsets.all(2), - margin: EdgeInsets.all(2), - decoration: new BoxDecoration( - color: Colors.red[800], - borderRadius: BorderRadius.circular(20), - ), - constraints: BoxConstraints( - minWidth: 20, - minHeight: 20, - ), - child: Center( - child: AppText( - model.specialClinicalCareMappingList - .length - .toString(), - color: Colors.white, - fontSize: projectsProvider.isArabic - ? 10 - : 11, - textAlign: TextAlign.center, - ), - )), - ], - ), - AppText(selectedMapId == null?TranslationBase.of(context).all:item.description, - fontSize: 12, - color: Colors.black, - fontWeight: FontWeight.bold, - textAlign: TextAlign.end), - ], - ); - }).toList(); - }, - onChanged: (newValue) async { - onChangeFunc(newValue); - }, - items: model.specialClinicalCareMappingList.map((item) { - return DropdownMenuItem( - child: AppText( - item.description, - textAlign: TextAlign.left, - ), - value: item.nursingStationID, - ); - }).toList(), - )), + child: DropdownButtonHideUnderline( + child: DropdownButton( + dropdownColor: Colors.white, + iconEnabledColor: Colors.black, + isExpanded: true, + value: selectedMapId ?? + model.specialClinicalCareMappingList[0].nursingStationID, + iconSize: 25, + elevation: 16, + selectedItemBuilder: (BuildContext context) { + return model.specialClinicalCareMappingList.map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + padding: EdgeInsets.all(2), + margin: EdgeInsets.all(2), + decoration: new BoxDecoration( + color: Colors.red[800], + borderRadius: BorderRadius.circular(20), + ), + constraints: BoxConstraints( + minWidth: 20, + minHeight: 20, + ), + child: Center( + child: AppText( + model.specialClinicalCareMappingList.length + .toString(), + color: Colors.white, + fontSize: + projectsProvider.isArabic ? 10 : 11, + textAlign: TextAlign.center, + ), + )), + ], + ), + AppText( + selectedMapId == null + ? TranslationBase.of(context).all + : item.description, + fontSize: 12, + color: Colors.black, + fontWeight: FontWeight.bold, + textAlign: TextAlign.end), + ], + ); + }).toList(); + }, + onChanged: (newValue) async { + onChangeFunc(newValue); + }, + items: model.specialClinicalCareMappingList.map((item) { + return DropdownMenuItem( + child: AppText( + item.description, + textAlign: TextAlign.left, + ), + value: item.nursingStationID, + ); + }).toList(), + )), ), ]), ), diff --git a/lib/screens/patients/patient_search/patient_search_header.dart b/lib/screens/patients/patient_search/patient_search_header.dart index 7df6905f..2dd01e1a 100644 --- a/lib/screens/patients/patient_search/patient_search_header.dart +++ b/lib/screens/patients/patient_search/patient_search_header.dart @@ -9,27 +9,28 @@ class PatientSearchHeader extends StatelessWidget with PreferredSizeWidget { @override Widget build(BuildContext context) { - return Container( + return Container( padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), decoration: BoxDecoration( color: Colors.white, ), child: Container( - padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + padding: EdgeInsets.only(left: 10, right: 10, bottom: 5), margin: EdgeInsets.only(top: 35), child: Row(children: [ IconButton( icon: Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, + color: Color(0xFF2B353E), //Colors.black, onPressed: () => Navigator.pop(context), ), Expanded( child: AppText( title, - fontSize: SizeConfig.textMultiplier * 2.8, - fontWeight: FontWeight.bold, + fontSize: 24.0, + fontWeight: FontWeight.w700, color: Color(0xFF2B353E), fontFamily: 'Poppins', + letterSpacing: -1.44, ), ), ]), @@ -38,5 +39,5 @@ class PatientSearchHeader extends StatelessWidget with PreferredSizeWidget { } @override - Size get preferredSize => Size(double.maxFinite,65); + Size get preferredSize => Size(double.maxFinite, 65); } diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 49f7d4e8..bf2baef5 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -17,7 +17,6 @@ import 'app_texts_widget.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - class AppDrawer extends StatefulWidget { @override _AppDrawerState createState() => _AppDrawerState(); @@ -37,7 +36,7 @@ class _AppDrawerState extends State { child: Drawer( child: Column(children: [ Expanded( - flex: 4, + flex: 7, child: ListView(padding: EdgeInsets.zero, children: [ Container( margin: EdgeInsets.symmetric(horizontal: 15), @@ -50,6 +49,8 @@ class _AppDrawerState extends State { Container( child: Image.asset( 'assets/images/dr_app_logo.png', + width: MediaQuery.of(context).size.width * 0.16, + height: MediaQuery.of(context).size.height * 0.16, ), margin: EdgeInsets.only(top: 10, bottom: 10), ), @@ -61,6 +62,7 @@ class _AppDrawerState extends State { child: Icon( DoctorApp.close_1, size: 20, + color: Color(0xff2B353E), ), ), margin: EdgeInsets.only(top: 20, bottom: 10), @@ -83,24 +85,29 @@ class _AppDrawerState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only(top: 10), + padding: EdgeInsets.only(top: 8.0), child: AppText( TranslationBase.of(context).dr + - authenticationViewModel.doctorProfile?.doctorName, - fontWeight: FontWeight.bold, + authenticationViewModel + .doctorProfile?.doctorName, + fontWeight: FontWeight.w700, color: Color(0xFF2E303A), fontFamily: 'Poppins', - fontSize: 17, + fontSize: 25.0, + letterSpacing: -1.5, ), ), Padding( padding: EdgeInsets.only(top: 0), child: AppText( - authenticationViewModel.doctorProfile?.clinicDescription, - fontWeight: FontWeight.w600, + authenticationViewModel + .doctorProfile?.clinicDescription, + fontWeight: FontWeight.w500, color: Color(0xFF2E303A), - fontSize: 15, + fontSize: 16, fontFamily: 'Poppins', + letterSpacing: -0.96, + //textAlign: TextAlign.left, )) ], ), @@ -110,6 +117,7 @@ class _AppDrawerState extends State { child: DrawerItem( TranslationBase.of(context).applyOrRescheduleLeave, icon: DoctorApp.reschedule__1, + // subTitle: , ), onTap: () { @@ -117,10 +125,11 @@ class _AppDrawerState extends State { Navigator.push( context, MaterialPageRoute( - builder: (context) => AddRescheduleLeavScreen(), - settings: RouteSettings(name: 'AddRescheduleLeaveScreen') - // MyReferredPatient(), - )); + builder: (context) => AddRescheduleLeavScreen(), + settings: RouteSettings( + name: 'AddRescheduleLeaveScreen') + // MyReferredPatient(), + )); }, ), SizedBox(height: 15), @@ -131,10 +140,11 @@ class _AppDrawerState extends State { // subTitle: , ), ), - SizedBox(height: 15), + SizedBox(height: MediaQuery.of(context).size.height * 0.02), InkWell( child: Container( - height: 80, + height: MediaQuery.of(context).size.height * 0.16, + width: MediaQuery.of(context).size.width * 0.16, child: Image.asset('assets/images/qr_code.png'), ), onTap: () {}, @@ -143,7 +153,7 @@ class _AppDrawerState extends State { ), ), SizedBox( - height: MediaQuery.of(context).size.height * 0.09, + height: MediaQuery.of(context).size.height * 0.02, ), Container( margin: EdgeInsets.symmetric(horizontal: 20), @@ -174,8 +184,8 @@ class _AppDrawerState extends State { ), onTap: () async { Navigator.pop(context); - await authenticationViewModel.logout(isFromLogin: false); - + await authenticationViewModel.logout( + isFromLogin: false); }, ), ], @@ -191,38 +201,44 @@ class _AppDrawerState extends State { child: Align( alignment: FractionalOffset.bottomCenter, child: Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - width: MediaQuery.of(context).size.width * 0.3, - child: RichText( - text: TextSpan( - text: 'Powered by', - style: TextStyle( - color: Color(0xFF989898), - fontWeight: FontWeight.bold, - fontSize: 14, - fontFamily: 'Poppins', - ), - children: [ - TextSpan( - text: ' Cloud Solutions', - style: TextStyle( - color: Color(0xFF2E303A), - fontSize: 15, - fontFamily: 'Poppins', - ), - ) - ]), + child: Padding( + padding: EdgeInsets.only( + left: projectsProvider.isArabic ? 0 : 15.0, + right: projectsProvider.isArabic ? 15.0 : 0), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.3, + child: RichText( + text: TextSpan( + text: 'Powered by', + style: TextStyle( + color: Color(0xFF989898), + fontWeight: FontWeight.w600, + fontSize: 14, + fontFamily: 'Poppins', + letterSpacing: -0.56, + ), + children: [ + TextSpan( + text: ' Cloud Solutions', + style: TextStyle( + color: Color(0xFF2E303A), + fontSize: 14, + fontFamily: 'Poppins', + letterSpacing: -0.56, + fontWeight: FontWeight.w700), + ) + ]), + ), ), - ), - // Text("Powered by"), - Image.asset( - 'assets/images/cs_logo_container.png', - width: SizeConfig.imageSizeMultiplier * 20, - ) - ], + // Text("Powered by"), + Image.asset('assets/images/cs_logo_container.png', + width: + MediaQuery.of(context).size.width * 0.13) + ], + ), )))) ])) ])), diff --git a/lib/widgets/shared/app_texts_widget.dart b/lib/widgets/shared/app_texts_widget.dart index 56a503a8..f612e9e0 100644 --- a/lib/widgets/shared/app_texts_widget.dart +++ b/lib/widgets/shared/app_texts_widget.dart @@ -103,7 +103,10 @@ class _AppTextState extends State { margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only( - top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft), + top: widget.marginTop, + right: widget.marginRight, + bottom: widget.marginBottom, + left: widget.marginLeft), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, @@ -118,16 +121,21 @@ class _AppTextState extends State { right: 0, child: Container( decoration: BoxDecoration( - gradient: LinearGradient(colors: [ - Theme.of(context).backgroundColor, - Theme.of(context).backgroundColor.withOpacity(0), - ], begin: Alignment.bottomCenter, end: Alignment.topCenter)), + gradient: LinearGradient( + colors: [ + Theme.of(context).backgroundColor, + Theme.of(context).backgroundColor.withOpacity(0), + ], + begin: Alignment.bottomCenter, + end: Alignment.topCenter)), height: 30, ), ) ], ), - if (widget.allowExpand && widget.readMore && text.length > widget.maxLength) + if (widget.allowExpand && + widget.readMore && + text.length > widget.maxLength) Padding( padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), child: InkWell( @@ -164,7 +172,13 @@ class _AppTextState extends State { ), child: Container( child: SelectableText( - !hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)), + !hidden + ? text + : (text.substring( + 0, + text.length > widget.maxLength + ? widget.maxLength + : text.length)), textAlign: widget.textAlign, // overflow: widget.maxLines != null // ? ((widget.maxLines > 1) @@ -180,9 +194,11 @@ class _AppTextState extends State { height: widget.fontHeight) : TextStyle( fontStyle: widget.italic ? FontStyle.italic : null, - color: widget.color != null ? widget.color : Colors.black, + color: + widget.color != null ? widget.color : Color(0xff2E303A), fontSize: widget.fontSize ?? _getFontSize(), - letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null), + letterSpacing: widget.letterSpacing ?? + (widget.variant == "overline" ? 1.5 : null), fontWeight: widget.fontWeight ?? _getFontWeight(), fontFamily: widget.fontFamily ?? 'Poppins', decoration: widget.textDecoration, @@ -192,9 +208,19 @@ class _AppTextState extends State { ); } else { return Text( - !hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)), + !hidden + ? text + : (text.substring( + 0, + text.length > widget.maxLength + ? widget.maxLength + : text.length)), textAlign: widget.textAlign, - overflow: widget.maxLines != null ? ((widget.maxLines > 1) ? TextOverflow.fade : TextOverflow.ellipsis) : null, + overflow: widget.maxLines != null + ? ((widget.maxLines > 1) + ? TextOverflow.fade + : TextOverflow.ellipsis) + : null, maxLines: widget.maxLines ?? null, style: widget.style != null ? _getFontStyle().copyWith( @@ -206,7 +232,8 @@ class _AppTextState extends State { fontStyle: widget.italic ? FontStyle.italic : null, color: widget.color != null ? widget.color : Colors.black, fontSize: widget.fontSize ?? _getFontSize(), - letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null), + letterSpacing: widget.letterSpacing ?? + (widget.variant == "overline" ? 1.5 : null), fontWeight: widget.fontWeight ?? _getFontWeight(), fontFamily: widget.fontFamily ?? 'Poppins', decoration: widget.textDecoration, diff --git a/lib/widgets/shared/drawer_item_widget.dart b/lib/widgets/shared/drawer_item_widget.dart index 2b8ce40d..46497e17 100644 --- a/lib/widgets/shared/drawer_item_widget.dart +++ b/lib/widgets/shared/drawer_item_widget.dart @@ -12,7 +12,8 @@ class DrawerItem extends StatefulWidget { final Color color; final String assetLink; - DrawerItem(this.title, {this.icon, this.color, this.subTitle = '', this.assetLink}); + DrawerItem(this.title, + {this.icon, this.color, this.subTitle = '', this.assetLink}); @override _DrawerItemState createState() => _DrawerItemState(); @@ -26,33 +27,34 @@ class _DrawerItemState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if(widget.assetLink!=null) + if (widget.assetLink != null) Container( height: 20, width: 20, child: Image.asset(widget.assetLink), ), - if(widget.assetLink==null) - Icon( - widget.icon, - color: widget.color ?? Colors.black87, - size: SizeConfig.imageSizeMultiplier * 5, - ), + if (widget.assetLink == null) + Icon( + widget.icon, + color: widget.color ?? Colors.black87, + size: SizeConfig.imageSizeMultiplier * 5, + ), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ Container( - width: MediaQuery.of(context).size.width *0.45, + width: MediaQuery.of(context).size.width * 0.45, child: AppText( widget.title, marginLeft: 5, marginRight: 5, - color:widget.color ??Color(0xFF2E303A), + color: widget.color ?? Color(0xFF2E303A), fontSize: 14, fontFamily: 'Poppins', fontWeight: FontWeight.w600, + letterSpacing: -0.84, ), ), ],