From d16ea676cf46aeb8959d58313ce721d782658737 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 1 Sep 2020 12:25:04 +0300 Subject: [PATCH] done parking service ,fix design issues in home page and add new icon --- assets/app_icons/config.json | 16 +++++++++++++++- assets/app_icons/fonts/DQIcons.ttf | Bin 5984 -> 7016 bytes .../service/medical/vital_sign_service.dart | 7 +++++++ lib/core/viewModels/dashboard_view_model.dart | 12 +++--------- lib/d_q_icons_icons.dart | 1 + .../AlHabibMedicalService/parking_page.dart | 9 ++++----- lib/pages/landing/home_page.dart | 9 +++++---- 7 files changed, 35 insertions(+), 19 deletions(-) diff --git a/assets/app_icons/config.json b/assets/app_icons/config.json index b2f57098..4c7eefa6 100644 --- a/assets/app_icons/config.json +++ b/assets/app_icons/config.json @@ -117,6 +117,20 @@ "search": [ "weight-scale" ] + }, + { + "uid": "363eebd3ff1ac281c38b4ddbc6a2e9d3", + "css": "parking_icon", + "code": 59400, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M592.8 33.4C552.3 32.7 518.9 60.5 518.3 95.2S550.2 158.9 590.7 159.6 664.6 132.5 665.2 97.7 633.3 34.1 592.8 33.4ZM590.9 145C559.8 144.5 534.8 122.3 535.2 95.5S561.4 47.4 592.6 48 648.7 70.7 648.3 97.5 622.1 145.6 590.9 145ZM593.4 1.7C535.4 0.8 487.5 41.5 486.7 92.5 486.3 115.8 502.6 147.6 535.2 187.2A605.7 605.7 0 0 0 583.6 239.1L589.2 244.4 595.1 239.3A605.6 605.6 0 0 0 645.2 189.1C679.1 150.6 696.5 119.4 696.9 96.1 697.8 45.1 651.3 2.7 593.4 1.7ZM632.5 180.2A610.9 610.9 0 0 1 589.6 223.9 610.5 610.5 0 0 1 548.2 178.9C518.2 142.4 502.4 112.6 502.8 92.8 503.5 49.6 544 15.1 593.1 15.9S681.5 52.6 680.8 95.8C680.4 115.6 663.8 144.8 632.5 180.2ZM599.7 63.9L574.1 63.5 573.1 125.8 587.6 126 587.9 107.2 599 107.4A21.7 21.7 0 0 0 599.7 63.9ZM599.2 92.8L588.2 92.7 588.4 78.3 599.5 78.5A7.2 7.2 0 0 1 599.2 92.8ZM187.7 292.7H128.8A129 129 0 0 0 0 421.5V907.3A55.3 55.3 0 0 0 55.2 962.5H261.3A55.3 55.3 0 0 0 316.5 907.3V421.5A129 129 0 0 0 187.7 292.7ZM116.7 315.4A109.8 109.8 0 0 1 22.8 409.4 106.9 106.9 0 0 1 116.7 315.4ZM22.1 604A135.3 135.3 0 0 1 34.3 547.5L63.4 588.9A32.9 32.9 0 0 0 58.9 605.5V767.4A33 33 0 0 0 62 781.5L28.3 829.5A32.9 32.9 0 0 1 22.1 810.1ZM92 800.5H224.5A32.9 32.9 0 0 0 238.6 797.4L270 842A33 33 0 0 1 261.3 843.2H55.2A33 33 0 0 1 46.5 842L77.9 797.4A32.9 32.9 0 0 0 92 800.5ZM81 767.4V605.5A11.1 11.1 0 0 1 92 594.4H224.5A11.1 11.1 0 0 1 235.5 605.5V767.4A11.1 11.1 0 0 1 224.5 778.4H92A11.1 11.1 0 0 1 81 767.4ZM236.2 574.5A33 33 0 0 0 224.5 572.4H92A33 33 0 0 0 80.3 574.5L46.5 526.4A136 136 0 0 1 270.1 526.4ZM294.4 907.3A33.2 33.2 0 0 1 261.3 940.4H55.2A33.2 33.2 0 0 1 22.1 907.3V854.2A54.9 54.9 0 0 0 55.2 865.3H261.3A54.9 54.9 0 0 0 294.4 854.2ZM294.4 810.1A32.9 32.9 0 0 1 288.2 829.4L254.5 781.5A33 33 0 0 0 257.6 767.4V605.5A32.9 32.9 0 0 0 253.1 588.9L282.2 547.5A135.3 135.3 0 0 1 294.4 604ZM294.4 523.5A158.2 158.2 0 0 0 22.1 523.5V431.7A131.9 131.9 0 0 0 139.1 314.7H181.9A131.9 131.9 0 0 0 294.4 431.2ZM204.3 316A106.9 106.9 0 0 1 293.6 408.7 110.9 110.9 0 0 1 204.3 316ZM204.3 316M624.9 292.7H566A129 129 0 0 0 437.2 421.5V907.3A55.3 55.3 0 0 0 492.4 962.5H698.5A55.3 55.3 0 0 0 753.7 907.3V421.5A129 129 0 0 0 624.9 292.7ZM730.8 408.7A110.9 110.9 0 0 1 641.5 316 106.9 106.9 0 0 1 730.8 408.7ZM554 315.4A109.8 109.8 0 0 1 460 409.4 106.9 106.9 0 0 1 554 315.4ZM459.3 604A135.3 135.3 0 0 1 471.6 547.5L500.6 588.9A32.9 32.9 0 0 0 496.1 605.5V767.4A33 33 0 0 0 499.3 781.5L465.6 829.5A32.9 32.9 0 0 1 459.3 810.1ZM529.2 800.5H661.7A32.9 32.9 0 0 0 675.8 797.4L707.2 842A33 33 0 0 1 698.5 843.2H492.4A33 33 0 0 1 483.7 842L515.1 797.4A32.9 32.9 0 0 0 529.2 800.5ZM518.2 767.4V605.5A11.1 11.1 0 0 1 529.2 594.4H661.7A11.1 11.1 0 0 1 672.8 605.5V767.4A11.1 11.1 0 0 1 661.7 778.4H529.2A11.1 11.1 0 0 1 518.2 767.4ZM673.4 574.5A33 33 0 0 0 661.7 572.4H529.2A33 33 0 0 0 517.5 574.5L483.7 526.4A136 136 0 0 1 707.3 526.4ZM731.6 907.3A33.2 33.2 0 0 1 698.5 940.4H492.4A33.2 33.2 0 0 1 459.3 907.3V854.2A54.9 54.9 0 0 0 492.4 865.3H698.5A54.9 54.9 0 0 0 731.6 854.2ZM731.6 810.1A32.9 32.9 0 0 1 725.4 829.4L691.7 781.5A33 33 0 0 0 694.8 767.4V605.5A32.9 32.9 0 0 0 690.3 588.9L719.4 547.5A135.3 135.3 0 0 1 731.6 604ZM731.6 523.5A158.2 158.2 0 0 0 459.3 523.5V431.7A131.9 131.9 0 0 0 576.3 314.7H619.1A131.9 131.9 0 0 0 731.6 431.2ZM731.6 523.5M366.6 977.9H388.6V1000H366.6ZM366.6 977.9M366.6 290.4H388.6V955.8H366.6ZM366.6 290.4M366.6 246.3H388.6V268.4H366.6ZM366.6 246.3M43.4 896.2H65.5V918.3H43.4ZM43.4 896.2M251 896.2H273.1V918.3H251ZM251 896.2M483.6 896.2H505.7V918.3H483.6ZM483.6 896.2M691.2 896.2H713.2V918.3H691.2ZM691.2 896.2", + "width": 754 + }, + "search": [ + "parking_icon" + ] } ] -} \ No newline at end of file +} diff --git a/assets/app_icons/fonts/DQIcons.ttf b/assets/app_icons/fonts/DQIcons.ttf index ddb147b0ed66e8baa61546405a08fae52aff90b5..8365db4766e73d654150b1de29fba2b30ceaaf6b 100644 GIT binary patch delta 1441 zcmb_cU1%d!6h3EW?%e!sVltVTY_j>8OgbrPlWmikjBU1Qcf06T(50*Esw*zp?rytl z(^gxgE-MkFpr}xZFDil*>YMmeA6)6H;)Aq{_^{wh(M4MDq46>V%#lesxK^NwDu3I_YTXur)MW>v5*`B;28!=y|y@qReXol zBP>tN)asY($D?Oj04i(Xex941U%2`HXU_pdZ!^NHudVB&9zYf{Bh{+sLg3gh;N`a& z0^iJka{bS{{cHO?>Eq9`+y$J2vg7o5@O8*F(^$v1o69(iuI4SgdxZP3-DX9?jAz!% zjC~+p>a+kn!BD5Um))KYEMe6-j5I98GI1W;UjFy zv>y{#HVs-pvz$ObW(|>ws**&zY?rM@*`OjdvW8t{Jn<;fl2xiA3>An=F$vsuXel<$OXvD-JA*?Fl0-|}J$)Ap5!0Yn3-CiFr zkk-YDUeQzPhT72d$~9tk3D%%5F7Rpbo+V0?0@)CRBo#!mM8uAJi-=32s7aO4iWHIj z8-6Je+6VSJhjJvZE-Qio*A2OoQt(jaiI$ zAK{L4$CuGE^kcEZghZl)x?z8)%5r2No+@xhM@Dd1YM}2fUo1dG;fr)dZ$(v2Q}KJf zl2*D*(q*;2OT=>2y+Uc9+vDN$h_HBB6p)~Z6kX^>4|1Gmxt A<^TWy delta 404 zcmaE1_CRlfa=ixw17i;Z14CGHZel^k_ctFI7??PKVwci$D${(IA1q~HVE(|s!2c&B zH8Dl%r&2CZ?E@e-%K!>+)UYf8viAV7N=9x;g`(d7w?Ms5K>VEii*pu7Z-uaK9Ro0{t=74(mRLHG^O(k})1#U=FtZLSOqVh?}{>L%_{cIISY z1TukmP4!&vcz&C&4BX5wfFcaHBlB}$^#AYwqgf4@LxFq_1}2aw5P1V(#C_Q@9*Eo^`itU$~R#5zFC0#us>R?ff>0~7^m)B)05U~v`(1F#wvkoXJs z$sSCKKqYL83z-;!K4ahkVg`l+FbTAMaszXc2$*w)aRT!)mI_t{b{_T)_J5mMSpM>F lekv})EX>Ks#K_FZ!pO?V#>mdd!N|$THJMM^1LzC}1^~39QHB5j diff --git a/lib/core/service/medical/vital_sign_service.dart b/lib/core/service/medical/vital_sign_service.dart index ad35d357..16909fd9 100644 --- a/lib/core/service/medical/vital_sign_service.dart +++ b/lib/core/service/medical/vital_sign_service.dart @@ -6,6 +6,9 @@ import '../base_service.dart'; class VitalSignService extends BaseService { List vitalSignResModelList = List(); Map body = Map(); + String weightKg = ""; + String heightCm = ""; + String bloadType = ""; Future getPatientRadOrders({int appointmentNo, int projectID}) async { hasError = false; @@ -21,6 +24,10 @@ class VitalSignService extends BaseService { response['List_DoctorPatientVitalSign'].forEach((vital) { vitalSignResModelList.add(VitalSignResModel.fromJson(vital)); }); + vitalSignResModelList.forEach((element) { + weightKg = '${element.weightKg}'; + heightCm = '${element.heightCm}'; + }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/viewModels/dashboard_view_model.dart b/lib/core/viewModels/dashboard_view_model.dart index 16ce9cfb..e2523120 100644 --- a/lib/core/viewModels/dashboard_view_model.dart +++ b/lib/core/viewModels/dashboard_view_model.dart @@ -1,28 +1,22 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/service/dashboard_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import '../../locator.dart'; class DashboardViewModel extends BaseViewModel { VitalSignService _vitalSignService = locator(); - String weightKg = ""; - String heightCm = ""; + String get weightKg => _vitalSignService.weightKg; + String get heightCm => _vitalSignService.heightCm; String bloadType = ""; getPatientRadOrders() async { - if (!isLogin) { + if (!isLogin && _vitalSignService.weightKg.isEmpty) { setState(ViewState.Busy); await _vitalSignService.getPatientRadOrders(); - if (_vitalSignService.hasError) { error = _vitalSignService.error; setState(ViewState.Error); } else - _vitalSignService.vitalSignResModelList.forEach((element) { - weightKg = '${element.weightKg}'; - heightCm = '${element.heightCm}'; - }); setState(ViewState.Idle); } } diff --git a/lib/d_q_icons_icons.dart b/lib/d_q_icons_icons.dart index 570861bf..fc9679ca 100644 --- a/lib/d_q_icons_icons.dart +++ b/lib/d_q_icons_icons.dart @@ -29,4 +29,5 @@ class DQIcons { static const IconData outline = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/pages/AlHabibMedicalService/parking_page.dart b/lib/pages/AlHabibMedicalService/parking_page.dart index 9610ad35..82c390ea 100644 --- a/lib/pages/AlHabibMedicalService/parking_page.dart +++ b/lib/pages/AlHabibMedicalService/parking_page.dart @@ -9,6 +9,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:maps_launcher/maps_launcher.dart'; +import '../../d_q_icons_icons.dart'; + class ParkingPage extends StatelessWidget { @override Widget build(BuildContext context) { @@ -41,11 +43,8 @@ class ParkingPage extends StatelessWidget { Row( children: [ Expanded( - child: Image.asset( - 'assets/images/timeline_bg.png', - height: 150, - fit: BoxFit.cover, - )), + child: Container(child: Icon(/*Icons.landscape*/DQIcons.parking_icon,size: 130),), + ), SizedBox( width: 15, ), diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 17eba227..fd125475 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -368,7 +368,7 @@ class _HomePageState extends State { textAlign: TextAlign.center, color: Colors.white, bold: true, - fontSize: 14, + fontSize: SizeConfig.textMultiplier * 2.0, ) ], ), @@ -390,13 +390,14 @@ class _HomePageState extends State { height: 40, ), SizedBox( - height: 15, + height: 20, ), Texts( TranslationBase.of(context).onlinePharmacy, textAlign: TextAlign.center, color: Colors.white, bold: true, + fontSize: SizeConfig.textMultiplier * 2.0, ) ], ), @@ -424,7 +425,7 @@ class _HomePageState extends State { textAlign: TextAlign.center, color: Colors.white, bold: true, - fontSize: 14, + fontSize: SizeConfig.textMultiplier * 2.0, ) ], ), @@ -529,7 +530,7 @@ class _HomePageState extends State { textAlign: TextAlign.center, color: Colors.black87, bold: false, - fontSize: SizeConfig.textMultiplier * 1.60, + fontSize: SizeConfig.textMultiplier * 2.0, ) ], ),