From 89cfcd3cad5c84d3cfafd1a295bf57acc8dc34df Mon Sep 17 00:00:00 2001 From: Mohammad Aljmma Date: Tue, 27 Oct 2020 18:16:14 +0300 Subject: [PATCH] fix design issues --- assets/images/online_payment_icon.png | Bin 0 -> 3166 bytes assets/images/search_medicine_icon.png | Bin 0 -> 1281 bytes assets/images/vital_sign_icon.png | Bin 0 -> 1347 bytes lib/pages/landing/home_page.dart | 245 ++++++++++-------- lib/pages/medical/medical_profile_page.dart | 13 +- .../medical/time_line_widget.dart | 4 +- 6 files changed, 139 insertions(+), 123 deletions(-) create mode 100644 assets/images/online_payment_icon.png create mode 100644 assets/images/search_medicine_icon.png create mode 100644 assets/images/vital_sign_icon.png diff --git a/assets/images/online_payment_icon.png b/assets/images/online_payment_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a6e0150af3d2fe2804bbf58a258a6f8ffdbe9d68 GIT binary patch literal 3166 zcmV-k459OhP)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91M4$rz z1ONa40RR91E&u=k05Fq|X#fBV)Ja4^RA>d|S_@dzRTlrvFarb3APPPh5CseHQ7egP zYFU=rZY6DIFH_UcXYN;DTCMt}*4CDq56q&nFY}eT)h388?uL@7C9fn+5K|yzKr|I+ znBg%q{P&zY%rwF<3`$>Uhwsk4|8vhd_uk(<_l*oqNRp(X#F|Q>FNJ;-f+*Zbbb%U^ z-xxN^WU|A~jg#3w2nZFWU!^dgf|s3tgU42C-%1LL2^cfCRRBU@+)C-sC`2>!4@f^y zn68mRnO z24M2;mgnj1R&|1wQg-vW(=be z)0&iXe#50Q7(SRNg7LGLL{?p09ZnP$qHm1NRQ0CWBELT8-_EKYr`dNKq*ek6WoBg~ zK%=3CPof5Egnfg-fWCcW1Q=PAU#2TZeEeVmOhJJSFgFzufOK*r&@4-;(L)g#4|(TM z)aQN)%jv`5;i6Hi5gHl_&iB&N7Dkd#d+_6C`lg+)fdON=s->|oAO8w3QJKY>=4gCn}GwT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/images/search_medicine_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..349620a5c596fa0c18318138dea658a1c357152f GIT binary patch literal 1281 zcmV+c1^)VpP)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91E}#Pd z1ONa40RR91E&u=k0C8FdJ^%m&cS%G+RA>d&noUSlQ547T_)*|!PN6tuB=`|1k+Y~p zBs4-$o6toYSGs6tpssR}Ah^g@wa{IQ+ACTcl{QwEltp7ff*;`oilI0&>Ij-Lo&O!r z^t`>%_vSsFnFH5*-+k|%`+Mh}bMCvULnso7L_E}0N5xA8Z5NefNRTG=Q5mK3(&2ER ztuF-KLM0U?Ku|5Z)O2GY6^Rw50fx^&gKoA`RnMI%T-Wch3I{bj1o}0FVO6vsb=1P* z>0oIsybH_#_iB67r0s>P1PB&ykxmi>cqE;OnKg?WM^XEh*Tq~YEH?h^O7-RWIik#! zBiuPBEl+1VI3Rl`{bFn}5Cc{z@dC}&CBjpfr`|GrZL6yc`&T41;IE%`iJIaw(z@kj z<)!eJe37xmRWUrjBEmbn61?l$MUk7GX&9Ivv<>|Ej|K5!YC)8dHSZr{O}tp&%#wT_ z)_-!N(mXtZ)2a;3FGsw6A0v+@<|6CcJBHQ0TUeFj?!EqQY8)nzTRxjVk$P!!OS%VJ z+RU=ooI5QZTqzZ^p-s60X6CmH4i~}Fw-Z1-Xas7*kWbY1f08w_4a@D40#RL%C;DfX z1dL!*EQ60N1Y{s00QCd`+c7>PoY`5Tv9efT)94tV-Ur!Kbv_!nq|2yS0*B?09gscr z1kjH^|C9mylmf7+s#u`L3L&$wAT1WjY*F0q z@%dx!!To^uEw7PpZ_7-gzO0$R#2l6^?si7MIc9_Vmst8eS(KrXap1!YjZC5nc2=yA zQLzNhz70!i#hH~UM*Pb%b6_=)RetYTS`Qk}Os=d8brrNa)wVTo3OZO4kXmWKS}LvE zFf=Ldy!s-u1vVNzXp9@4kB(RUUaM1WTmDwzz-zvILENoy$MnN}u<<|;c=5gjVQp+q zMU+*Z-MkbVe^|qo;KU@o-+oCzUT)OfJ_zFBhiREjy6D5qj979Nwl;zae%hNcqaRoZY8)cWT3Sv*KTKPkq2V6z;SmBv zzJ~QUb6_*UK_PnP{Fmbai$F#8Fq1(TR$H3_*FwWRAjk+>Xsz<2Y#Rzv@W^wMM2Rziq rTY0IVolhkh0$=t~8Kp9){u9Dq?i-OHwQP@Q00000NkvXXu0mjf&wMt| literal 0 HcmV?d00001 diff --git a/assets/images/vital_sign_icon.png b/assets/images/vital_sign_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fbd0908bdcb4e49a4721dac69a5f3311245274c8 GIT binary patch literal 1347 zcmV-J1-$x+P)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91KA-~t z1ONa40RR91E&u=k0A>rHLjV8-xk*GpRA>d|T0Ku2K@eRVJ4%6MP>@mrQbazAU@J|M z2B=a3ZHm}#(*QrfG6jW61N;J;HU%KjBoY!7DN;njiIk*C1f`pRB~r$0-dkAfd_J># z+?@e4()jLXKW^Ua?Ck8GW5PvJ%I6T}!H>aD!1us6k^VsGALm?&#bTd5K>+Yw@G|%x zxYvl7O5mghAL9)KPjPtwJ z%XA8G8G_A%ZwqJ+D6zifPnu7+j2nka%Up|2>2z9LKVN)Pi4_ldT_7^Ge!^6XFV)6B^$bfSSFz_(|UPp=q zI6*TQ6^li|0B8%I?HI-D^?KyC3LM-P78Y7kSSo#Ra3C0v7~mM`37$k?nplslR|0J; zJ`=o_bGi%<59?;3T>}G0ip1=%sSuScm&?tluE9FNbG>KoPuktx6|1YO%0p-@0-m3r z7dk#T`)36P{hso+iV(mUYS)D|Sz^tXpJkL0onF{Yk>!vy^h;j+_oN^&q7 zGxLZTuC6u{4zarBmXagJ?If2S-t*vrS4RC#C$8Lf>H`Y4WBV|O$K3qP#f{H}WMfdy zLC(wTPK-kUYvnyw!Hu7f*da#Os?%;8==k_pB9T&4%=Q}}f!AyljE(Uj};0&L8m^iJU0r;ufo$&^Om*8b^1Kevw zOz*%i&anzL;!czpeg26z2j(Amd*M&KKY^nRz%75`{SVNp{4@C-6<+`V002ovPDHLk FV1j1oUAzDQ literal 0 HcmV?d00001 diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index e8542edc..550eae30 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -83,7 +83,7 @@ class _HomePageState extends State { ], ), ), - Container(width: double.infinity, height: MediaQuery.of(context).size.height * 0.12), + Container(width: double.infinity, height: 125), ], ), Positioned( @@ -93,7 +93,7 @@ class _HomePageState extends State { child: (!model.isLogin && projectViewModel.user == null) ? Container( width: double.infinity, - height: MediaQuery.of(context).size.height * 0.17, + height: 180, decoration: BoxDecoration( color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, @@ -166,7 +166,7 @@ class _HomePageState extends State { ) : Container( width: double.infinity, - height: MediaQuery.of(context).size.height * 0.17, + height: projectViewModel.isArabic?180: 150, decoration: BoxDecoration( color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, @@ -184,7 +184,7 @@ class _HomePageState extends State { child: Container( margin: EdgeInsets.all(5), child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ @@ -289,7 +289,8 @@ class _HomePageState extends State { Expanded( child: Row( mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, children: [ + crossAxisAlignment: CrossAxisAlignment.center, + children: [ Image.asset( 'assets/images/test-weight.png', width: 30, @@ -357,130 +358,144 @@ class _HomePageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - DashboardItem( - onTap: () { - Navigator.push( - context, - FadePage( - page: VitalSignDetailsScreen(), - ), - ); - }, - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Container( - width: 50, - height: 50, + Expanded( + child: DashboardItem( + onTap: () { + Navigator.push( + context, + FadePage( + page: VitalSignDetailsScreen(), + ), + ); + }, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + SizedBox(height: 15,), + + Container( + width: 60, decoration: BoxDecoration( - color: Colors.white, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(12) + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(12) ), - child: Center(child: Icon(DQIcons.vital_sign_icon,size: 40,color: Theme.of(context).primaryColor,)), - ), - - Texts( - TranslationBase.of(context) - .vitalSigns, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier * 1.5, - ) - ], + child: Center(child: Image.asset('assets/images/vital_sign_icon.png', + width: 80, + height: 50, + fit: BoxFit.contain,)), + ), + SizedBox(height: 20,), + Texts( + TranslationBase.of(context) + .vitalSigns, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, + ) + ], + ), ), ), + margin: 4, + height: 170, + imageName: 'home_healthcare_service_bg.png', + opacity: 1.0, ), - height: MediaQuery.of(context).size.width * 0.35, - imageName: 'home_healthcare_service_bg.png', - opacity: 1.0, ), - DashboardItem( - onTap: () { - Navigator.push( - context, - FadePage( - page: MedicineSearch(), - ), - ); - }, - opacity: 1.0, - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Container( - width: 50, - height: 50, - decoration: BoxDecoration( - color: Colors.white, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(12) + Expanded( + child: DashboardItem( + onTap: () { + Navigator.push( + context, + FadePage( + page: MedicineSearch(), + ), + ); + }, + opacity: 1.0, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + SizedBox(height: 15,), + Container( + width: 50, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(12) + ), + child: Center(child: Image.asset('assets/images/search_medicine_icon.png', + width: 50, + height: 50, + fit: BoxFit.contain,)), ), - child: Center(child: Icon(DQIcons.search_medicine_icon,size: 40,color: Theme.of(context).primaryColor,),), - ), - - Texts( - TranslationBase.of(context).searchMedicine, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier * 1.5, - ) - ], + SizedBox(height: 20,), + Texts( + TranslationBase.of(context).searchMedicine, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, + ) + ], + ), ), ), + margin: 4, + height: 170, + imageName: 'al-habib_onlne_pharmacy_bg.png', ), - height: MediaQuery.of(context).size.width * 0.35, - imageName: 'al-habib_onlne_pharmacy_bg.png', ), - DashboardItem(opacity: 1.0, - onTap: (){ - Navigator.push( - context, - FadePage( - page: PaymentService(), - ), - ); - }, - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - - children: [ - Container( - // width: 50, - // height: 50, - decoration: BoxDecoration( - color: Colors.white, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(12) + Expanded( + child: DashboardItem(opacity: 1.0, + onTap: (){ + Navigator.push( + context, + FadePage( + page: PaymentService(), + ), + ); + }, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + SizedBox(height: 15,), + Container( + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(12) + ), + child: Center(child: Image.asset('assets/images/online_payment_icon.png', + width: 80, + height: 50, + fit: BoxFit.contain,)), ), - child: Center(child: Icon(DQIcons.online_payment_icon,size: 40,color: Theme.of(context).primaryColor,)), - ), + SizedBox(height: 15,), - Texts( - TranslationBase.of(context).onlinePaymentService, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier * 1.7, - ) - ], + Texts( + TranslationBase.of(context).onlinePaymentService, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, + ) + ], + ), ), ), + margin: 4, + height: 170, + imageName: 'online_payments_bg.png', ), - height: MediaQuery.of(context).size.width * 0.35, - //color: HexColor("#747C80"), - imageName: 'online_payments_bg.png', ), ], ), @@ -724,7 +739,7 @@ class DashboardItem extends StatelessWidget { this.width, this.height, this.color, - this.opacity = 1.0,this.icon}) + this.opacity = 1.0,this.icon,this.margin=0}) : super(key: key); final bool hasBorder; final String imageName; @@ -734,6 +749,7 @@ class DashboardItem extends StatelessWidget { final double height; final Color color; final double opacity; + final double margin; final Widget icon; @override @@ -766,6 +782,7 @@ class DashboardItem extends StatelessWidget { ) : icon, ), + margin: EdgeInsets.all(margin), child: Center( child: child, ), diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 228bd1b6..d9054cb9 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -96,7 +96,7 @@ class _MedicalProfilePageState extends State { children: [ Container( width: double.infinity, - height: 30, + height: 55, ), Row( children: [ @@ -500,14 +500,14 @@ class _MedicalProfilePageState extends State { ), if (model.user != null) Positioned( - top: 175, + top: 185, left: 20, right: 20, child: Container( width: double.infinity, - height: 70, + height: 80, decoration: BoxDecoration( - color: Colors.grey[600], + color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, border: Border.all( color: Colors.transparent, width: 0.5), @@ -519,6 +519,7 @@ class _MedicalProfilePageState extends State { fit: BoxFit.cover)), child: Column( crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ SizedBox( height: 8, @@ -529,9 +530,7 @@ class _MedicalProfilePageState extends State { model.user.lastName, color: Colors.white, ), - SizedBox( - height: 8, - ), + Texts( '${model.user.patientID}', color: Colors.white, diff --git a/lib/widgets/data_display/medical/time_line_widget.dart b/lib/widgets/data_display/medical/time_line_widget.dart index bbbbfeb2..5623cf56 100644 --- a/lib/widgets/data_display/medical/time_line_widget.dart +++ b/lib/widgets/data_display/medical/time_line_widget.dart @@ -31,7 +31,7 @@ class TimeLineWidget extends StatelessWidget { ), if (isUp) Positioned( - top: 20, + top: 15, child: Container( margin: EdgeInsets.only(left: 2, right: 2), child: Column( @@ -90,7 +90,7 @@ class TimeLineWidget extends StatelessWidget { ) else Positioned( - top: 70, + top: 65, child: Container( margin: EdgeInsets.only(left: 2, right: 2), child: Column(