From 821cdf474d61dd7e0167607e1b2af3e913b35057 Mon Sep 17 00:00:00 2001 From: Sultan khan Date: Sun, 18 Oct 2026 13:43:35 +0300 Subject: [PATCH] ui updates --- assets/icons/ic_add_dependents.png | Bin 2430 -> 559 bytes lib/classes/consts.dart | 2 +- .../landing/dashboard_screen_for_dependet.dart | 15 ++++++++------- lib/ui/login/login_screen.dart | 10 ++++++---- lib/ui/profile/dependent_details_screen.dart | 2 +- lib/ui/profile/family_members.dart | 2 +- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/assets/icons/ic_add_dependents.png b/assets/icons/ic_add_dependents.png index 5202f1f28254206edef054c38821635c0c0956c3..81fd3dd0b9a937c58747907c6b5bea1942d5f1bd 100644 GIT binary patch literal 559 zcmV+~0?_@5P)oY42AEonAQdK(Vx09%F5L0V;7(-hL~@{6e=7GdOXe{Ga(80W-cQ+wATSKi%l;4mzbLllDjeTMZG!ald??5DeL-rjk9jr`IHi`5OBVKsx0xomARq%W zDH#_qR&y|X8-FJdZ1V2Z_(D<6kQG`A6~+Ts_!av zH|5KeUQoLJ?9h=j!H{)o$SO)jh=ksH+sa8CwBep4Ebr?6u=TSj&qtijBNJ?V+hIw~ z*MP9cj1Tb3GFS~!L`VZxSTccU^$@q$X8;^e_Y!Zq z9F$TbJjaSnd01U`nF+FO!8BwxUrLDN#PVT%%dR3Qr7T_KIFswEZxw-g*MP`Dv(8EJ zmDp7TbAZ=uJwfvC4{|L${P9Nfr<<3Eia8T-I7pbjo0lh{{;)HF77mhV{nN2bj`=^n xieO zZKxGR7{~plk(4MVMGiM^p;;&yNm|AYLdDQ9N)i*rB+*DpEDD9ds4yxFlcb_h2~3g@ zqr%XOQDK-QCPhVZ6AMKpsVFkk=Ev@Woz9t;-FZ9b?uXwO@t)_I`S0$`JoC&m1H`qr z45;ZmqB~I2KZWg+oHyj8WM2Y4CqZ-vnsCTM%vSs&c|U=+)WS;kI}o&y*lp_f!nzi; z7B;p69!0H%jl^NkqWTiHJGN*k3;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eWpL|XLFw35n|1IlC-k_5e z{b9yVCZ%m69Db37$-0($iVGy0M731box&p9v8te?q3o*Q?5VuL1R?nRxwsFY;9`+I z5PZs3OTMq*Cu4Bcvo_=u^MLe->}&9Q2|o@A!_=QDj_T?Is$hmZTLes?&Ozuk75wJN ziL0{jMAuly+8lWS&Kzmy0A(EF^H}C-1A+w6a%~$RQlz`9pcSr9%F!n_a}#FG%CDQP z1ItQwM6bwVzp=$^#^RC!Glsi9T*U=aUmMzg)`hS{Mb?*SJfGa;?tNwHm+!M|CwwNGS+%v}3IYOQX$w7QD0%Pkto z40%=p0#${11k0Si4BO3{>!TRi1dZL(WrfxK@P!6g%f{Rb^#Rwh=;}iiZ1&_sse24` zKWZ|NQ>Upb0TFybM9K6*C7Vcgg)Q7Es$_Mp)eA`5h!%{gZw zVl%X&nh0x}%fqdU-cl(e!kA~et=8;q-BD4*#y&RQGBo*5Hq~5cNLK=axPao-Hg8ws z-%oZZYM-#&NizM9woe`x{_dx& w-;;ZCSdw+e7A0k2Rf4BPbOAa=*qT863&87#eAg } } + String _cleanDependentName(String name) { + return name.replaceAll(RegExp(r'\s*-\s*'), ' ').replaceAll(RegExp(r'\s+'), ' ').trim(); + } + @override void dispose() { _debounceTimer?.cancel(); @@ -518,14 +522,11 @@ class _DashboardScreenForDependetState extends State }, child: Padding( padding: const EdgeInsets.all(3), - child: Image.asset( - 'assets/icons/ic_add_dependents.png', + child: SvgPicture.asset( + 'assets/icons/ic_dependents_top.svg', width: 24, height: 24, - color: const Color(0xFF1E293B), - errorBuilder: - (context, error, stackTrace) => - SvgPicture.asset('assets/icons/ic_dependents_top.svg', width: 24, height: 24, colorFilter: const ColorFilter.mode(Color(0xFF1E293B), BlendMode.srcIn)), + colorFilter: const ColorFilter.mode(Color(0xFF1E293B), BlendMode.srcIn), ), ), ), @@ -577,7 +578,7 @@ class _DashboardScreenForDependetState extends State // on the last-login screen, shown for dependent logins only. if (ApiConsts.isDependetLogin && (AppState().dependentName ?? "").isNotEmpty) ...[ LocaleKeys.welcomeBack.tr().toText12(), - AppState().dependentName!.toText24(isBold: true), + _cleanDependentName(AppState().dependentName!).toText18(isBold: true), const SizedBox(height: 16), ], diff --git a/lib/ui/login/login_screen.dart b/lib/ui/login/login_screen.dart index 9b94420..e637e93 100644 --- a/lib/ui/login/login_screen.dart +++ b/lib/ui/login/login_screen.dart @@ -304,8 +304,9 @@ class _LoginScreenState extends State { } if (info.dependentName != null && info.dependentName!.isNotEmpty) { - AppState().setDependentName = info.dependentName; - Utils.saveStringFromPrefs("P_DEPENDENT_NAME", info.dependentName!); + String cleanedName = info.dependentName!.replaceAll(RegExp(r'\s*-\s*'), ' ').replaceAll(RegExp(r'\s+'), ' ').trim(); + AppState().setDependentName = cleanedName; + Utils.saveStringFromPrefs("P_DEPENDENT_NAME", cleanedName); } } @@ -669,8 +670,9 @@ class _LoginScreenState extends State { AppState().setWalaplusDepInfoModel = depLoginResponse!.getWalaplusDepInfoModel; String? depName = depLoginResponse.getWalaplusDepInfoModel?.pDependentName; if (depName != null && depName.trim().isNotEmpty) { - AppState().setDependentName = depName.trim(); - Utils.saveStringFromPrefs("P_DEPENDENT_NAME", depName.trim()); + String cleanedName = depName.replaceAll(RegExp(r'\s*-\s*'), ' ').replaceAll(RegExp(r'\s+'), ' ').trim(); + AppState().setDependentName = cleanedName; + Utils.saveStringFromPrefs("P_DEPENDENT_NAME", cleanedName); } } diff --git a/lib/ui/profile/dependent_details_screen.dart b/lib/ui/profile/dependent_details_screen.dart index 9cb0fa6..ea76079 100644 --- a/lib/ui/profile/dependent_details_screen.dart +++ b/lib/ui/profile/dependent_details_screen.dart @@ -409,7 +409,7 @@ class _DependentDetailsScreenState extends State { ), // Verified badge on right - only when NHIC has actually verified this contact - if (_isNhicVerified) ...[const SizedBox(width: 8), const Icon(Icons.verified_outlined, color: Color(0xFF059669), size: 24)], + if (_isNhicVerified) ...[const SizedBox(width: 8), const Icon(Icons.verified_rounded, color: Color(0xFF059669), size: 24)], ], ), ), diff --git a/lib/ui/profile/family_members.dart b/lib/ui/profile/family_members.dart index b41bd50..ed90415 100644 --- a/lib/ui/profile/family_members.dart +++ b/lib/ui/profile/family_members.dart @@ -396,7 +396,7 @@ class _FamilyMembersState extends State { style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xFF1E293B)), ), ), - if (_isNhicVerified(item)) ...[const SizedBox(width: 8), const Icon(Icons.verified_outlined, color: Color(0xFF059669), size: 20)], + if (_isNhicVerified(item)) ...[const SizedBox(width: 8), const Icon(Icons.verified_rounded, color: Color(0xFF059669), size: 20)], ], ), const SizedBox(height: 3),