From 5294948a5826065db9c76c4b89ec59b728f250e9 Mon Sep 17 00:00:00 2001 From: Mohammad ALjammal Date: Thu, 11 Jun 2020 13:03:26 +0300 Subject: [PATCH 1/5] fix issues --- lib/landing_page.dart | 9 +------ lib/screens/doctor/my_schedule_screen.dart | 3 +-- lib/widgets/doctor/doctor_reply_widget.dart | 24 ++++++++++++++++++- lib/widgets/doctor/my_schedule_widget.dart | 2 ++ .../patients/profile/large_avatar.dart | 2 -- lib/widgets/shared/app_drawer_widget.dart | 17 +++---------- .../shared/app_expandable_notifier.dart | 1 + lib/widgets/shared/app_scaffold_widget.dart | 11 ++++----- 8 files changed, 36 insertions(+), 33 deletions(-) diff --git a/lib/landing_page.dart b/lib/landing_page.dart index a9f844f8..174a38ab 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -51,14 +51,7 @@ class _LandingPageState extends State { }, ), centerTitle: true, - actions: [ - ProfileImageWidget( - height: 50, - width: 50, - url: - "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", - ) - ], + ), drawer: Theme( data: Theme.of(context).copyWith( diff --git a/lib/screens/doctor/my_schedule_screen.dart b/lib/screens/doctor/my_schedule_screen.dart index cd0f94a3..f7b9d444 100644 --- a/lib/screens/doctor/my_schedule_screen.dart +++ b/lib/screens/doctor/my_schedule_screen.dart @@ -15,8 +15,7 @@ class MyScheduleScreen extends StatelessWidget { @override Widget build(BuildContext context) { scheduleProvider = Provider.of(context); - return AppScaffold( - appBarTitle: TranslationBase.of(context).mySchedule, + return Scaffold( body: scheduleProvider.isLoading ? DrAppCircularProgressIndeicator() : scheduleProvider.isError diff --git a/lib/widgets/doctor/doctor_reply_widget.dart b/lib/widgets/doctor/doctor_reply_widget.dart index 5ec30858..6fc9ec66 100644 --- a/lib/widgets/doctor/doctor_reply_widget.dart +++ b/lib/widgets/doctor/doctor_reply_widget.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/list_gt_my_pationents_question_model.dart'; +import 'package:doctor_app_flutter/presentation/doctor_app_icons.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; @@ -42,7 +43,28 @@ class _DoctorReplyWidgetState extends State { child: Row( children: [ SizedBox(width: 5,), - LargeAvatar(name: widget.reply.patientName,url: '',), + //LargeAvatar(icon: widget.reply.gender == 0 ? DoctorApp.male : DoctorApp.femaleicon ,), + Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment(-1, -1), + end: Alignment(1, 1), + colors: [ + Colors.grey[100], + Colors.grey[200], + ]), + boxShadow: [ + BoxShadow( + color: Color.fromRGBO(0, 0, 0, 0.08), + offset: Offset(0.0, 5.0), + blurRadius: 16.0) + ], + borderRadius: BorderRadius.all(Radius.circular(50.0)), + ), + width: 80, + height: 80, + child: Icon(widget.reply.gender == 1 ? DoctorApp.male : DoctorApp.femaleicon,size: 80,)), + SizedBox(width: 15,), Expanded( child: Container( diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index c37d09ad..48f70d7c 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -45,6 +45,7 @@ class MyScheduleWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText('From',fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.bold,), + SizedBox(height: 5,), AppText(work.from,fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,) ], ), @@ -56,6 +57,7 @@ class MyScheduleWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText('To',fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.bold,), + SizedBox(height: 5,), AppText(work.to,fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,) ], ), diff --git a/lib/widgets/patients/profile/large_avatar.dart b/lib/widgets/patients/profile/large_avatar.dart index 3b70f393..845f1ee3 100644 --- a/lib/widgets/patients/profile/large_avatar.dart +++ b/lib/widgets/patients/profile/large_avatar.dart @@ -54,8 +54,6 @@ class LargeAvatar extends StatelessWidget { @override Widget build(BuildContext context) { - var vlr = name; - var asd; return InkWell( onTap: disableProfileView ? null diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 53228c97..919dc939 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -89,35 +89,24 @@ class _AppDrawerState extends State { }, ), ), - InkWell( - child: DrawerItem("My Schedule", Icons.table_chart), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ChangeNotifierProvider( - create: (_) => ScheduleProvider(), - child: MyScheduleScreen(), - ), - ), - ); - }, - ), InkWell( child: DrawerItem("Settings", Icons.settings), onTap: () { + Navigator.pop(context); Navigator.of(context).pushNamed(SETTINGS); }, ), InkWell( child: DrawerItem("QR Reader", Icons.search), onTap: () { + Navigator.pop(context); Navigator.of(context).pushNamed(QR_READER); }, ), InkWell( child: DrawerItem("lOGOUT", Icons.exit_to_app), onTap: () { + Navigator.pop(context); Navigator.of(context).pushNamed(LOGIN); }, ), diff --git a/lib/widgets/shared/app_expandable_notifier.dart b/lib/widgets/shared/app_expandable_notifier.dart index ca3edd09..4ae87e8a 100644 --- a/lib/widgets/shared/app_expandable_notifier.dart +++ b/lib/widgets/shared/app_expandable_notifier.dart @@ -30,6 +30,7 @@ class AppExpandableNotifier extends StatelessWidget { padding: EdgeInsets.all(10), child: Text( "See Graph Details", + style: TextStyle(fontWeight: FontWeight.bold), )), collapsed: Text(''), expanded: bodyWid, diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 1e6da3fc..a390e064 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -37,12 +37,11 @@ class AppScaffold extends StatelessWidget { }), centerTitle: true, actions: [ - ProfileImageWidget( - height: 50, - width: 50, - url: - "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", - ) + IconButton( + icon: Icon(DoctorApp.home_icon_active), + color: Colors.white, //Colors.black, + onPressed: () => Navigator.popAndPushNamed(context, HOME), + ), ], ) : null, From c8a3beb5301c29eebbf619ad548de4eb12780019 Mon Sep 17 00:00:00 2001 From: Mohammad ALjammal Date: Thu, 11 Jun 2020 15:13:08 +0300 Subject: [PATCH 2/5] fix issues in dev --- lib/config/config.dart | 3 +++ lib/widgets/shared/app_scaffold_widget.dart | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index d199986c..90b2592f 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -68,3 +68,6 @@ const PATIENT_OUT_SA = false; /// Timer Info const TIMER_MIN =10; +class AppGlobal{ + static var CONTEX; +} diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index fdc8611d..a390e064 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -1,9 +1,13 @@ -import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import '../../config/size_config.dart'; +import '../../presentation/doctor_app_icons.dart'; +import '../../widgets/shared/app_drawer_widget.dart'; import '../../widgets/shared/app_loader_widget.dart'; +import '../../widgets/shared/custom_shape_clipper.dart'; class AppScaffold extends StatelessWidget { String appBarTitle; @@ -14,7 +18,6 @@ class AppScaffold extends StatelessWidget { @override Widget build(BuildContext context) { - AppGlobal.CONTEX = context; return Scaffold( backgroundColor: Hexcolor('#F5F5F5'), appBar: appBarTitle != '' From e545d4992ca5dda2e2c5fe03a815842386350865 Mon Sep 17 00:00:00 2001 From: Mohammad ALjammal Date: Thu, 11 Jun 2020 16:01:00 +0300 Subject: [PATCH 3/5] fix issues in dev --- lib/client/base_app_client.dart | 2 +- lib/widgets/shared/app_scaffold_widget.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 63ae8fca..a6e14c51 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -73,7 +73,7 @@ class BaseAppClient { } else { var parsed = json.decode(response.body.toString()); if (!parsed['IsAuthenticated']) { - Navigator.of(AppGlobal.CONTEX).pushNamed(LOGIN); + await helpers.logout(); helpers.showErrorToast('Your session expired Please login agian'); } else if (parsed['MessageStatus'] == 1) { onSuccess(parsed, statusCode); diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index a390e064..ef8a983b 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -40,7 +40,7 @@ class AppScaffold extends StatelessWidget { IconButton( icon: Icon(DoctorApp.home_icon_active), color: Colors.white, //Colors.black, - onPressed: () => Navigator.popAndPushNamed(context, HOME), + onPressed: () => Navigator.pushReplacementNamed(context, HOME), ), ], ) From fa9e1a344a4a994504bcf2a5bd345a3a5b4160fb Mon Sep 17 00:00:00 2001 From: Mohammad ALjammal Date: Fri, 12 Jun 2020 10:03:35 +0300 Subject: [PATCH 4/5] fix issues --- lib/widgets/auth/login_form.dart | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index 48769b59..2d2d2bfd 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -69,16 +69,6 @@ class _LoginFormState extends State { _isInit = false; } - @override - void didChangeDependencies() { - super.didChangeDependencies(); - if (_isInit) { - if (projectsList.length == 0) { - getProjectsList(); - } - } - _isInit = false; - } @override Widget build(BuildContext context) { From b758ae8196296ec9eabe8f79c53e2461b437eca9 Mon Sep 17 00:00:00 2001 From: Mohammad ALjammal Date: Sun, 14 Jun 2020 10:45:44 +0300 Subject: [PATCH 5/5] fix issues --- .../vital_sign/vital_sign_details_screen.dart | 4 +-- .../profile/patient_profile_widget.dart | 5 ++-- .../profile/profile_medical_info_widget.dart | 27 ++++++++----------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index 16466704..68966553 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -99,7 +99,7 @@ class _VitalSignDetailsScreenState extends State { vitalSignDetails.bodyMeasurements }); }, - child: Expanded( + child: Container( child: VitalSignItem( des: 'Body Measurements', url: url + 'heartbeat.png', @@ -118,7 +118,7 @@ class _VitalSignDetailsScreenState extends State { }); }, - child: Expanded( + child: Container( child: VitalSignItem( des: 'Temperature', url: url + 'heartbeat.png', diff --git a/lib/widgets/patients/profile/patient_profile_widget.dart b/lib/widgets/patients/profile/patient_profile_widget.dart index 0ef50d81..87990fbf 100644 --- a/lib/widgets/patients/profile/patient_profile_widget.dart +++ b/lib/widgets/patients/profile/patient_profile_widget.dart @@ -36,8 +36,7 @@ class PatientProfileWidget extends StatelessWidget { SliverList( delegate: SliverChildListDelegate( [ - Expanded( - flex: 1, + Container( child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -78,7 +77,7 @@ class PatientProfileWidget extends StatelessWidget { ), SliverPadding( padding: const EdgeInsets.fromLTRB(20, 30, 15, 10), - sliver: ProfileMedicalInfoWidget()) + sliver: ProfileMedicalInfoWidget(patient: patient,)) ]); // Container( diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index bc92db90..16c9a0bd 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -291,23 +291,18 @@ class PatientProfileButton extends StatelessWidget { navigator(context, this.route); }, child: Column(children: [ - Expanded( - flex: 1, - child: Expanded( - child: Container( - alignment: Alignment.topLeft, - padding: EdgeInsets.all(5), - child: new AppText( - this.name, - color: Colors.red, - fontWeight: FontWeight.w600, - textAlign: TextAlign.left, - fontSize: SizeConfig.textMultiplier * 2, - ), - )), + Container( + alignment: Alignment.topLeft, + padding: EdgeInsets.all(5), + child: new AppText( + this.name, + color: Colors.red, + fontWeight: FontWeight.w600, + textAlign: TextAlign.left, + fontSize: SizeConfig.textMultiplier * 2, + ), ), - Expanded( - flex: 1, + Container( child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [