From 1599cfed4e2fc76edc35d6003c3c53290dc2cbc6 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Wed, 14 Jan 2026 12:06:59 +0300 Subject: [PATCH] UI/UX improvements-1. --- .../medical_file/medical_file_page.dart | 4 ++-- lib/widgets/appbar/collapsing_list_view.dart | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index d294688..8782736 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -1022,7 +1022,7 @@ class _MedicalFilePageState extends State { ); }), MedicalFileCard( - label: "Allergy Info".needTranslation, + label: "Allergy Information".needTranslation, textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.allergy_info_icon, @@ -1037,7 +1037,7 @@ class _MedicalFilePageState extends State { ); }), MedicalFileCard( - label: "Vaccine Info".needTranslation, + label: "Vaccine Information".needTranslation, textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.vaccine_info_icon, diff --git a/lib/widgets/appbar/collapsing_list_view.dart b/lib/widgets/appbar/collapsing_list_view.dart index 5409fcf..df7f163 100644 --- a/lib/widgets/appbar/collapsing_list_view.dart +++ b/lib/widgets/appbar/collapsing_list_view.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; @@ -64,7 +63,7 @@ class CollapsingListView extends StatelessWidget { SliverAppBar( automaticallyImplyLeading: isLeading, pinned: true, - // toolbarHeight: isLeading ? 24.h : kToolbarHeight, + toolbarHeight: isLeading ? 40.h : kToolbarHeight, leadingWidth: isLeading ? null : double.infinity, systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light), surfaceTintColor: Colors.transparent, @@ -89,8 +88,10 @@ class CollapsingListView extends StatelessWidget { ? Transform.flip( flipX: appState.isArabic(), child: IconButton( - icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.closeBottomNav : AppAssets.arrow_back, width: 24.h, height: 24.h), - padding: EdgeInsets.only(left: 12), + icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.close_bottom_nav_trans : AppAssets.arrow_back_new, width: 24.h, height: 24.h), + padding: EdgeInsets.zero, + constraints: BoxConstraints(), + style: const ButtonStyle(tapTargetSize: MaterialTapTargetSize.shrinkWrap), onPressed: () { if (leadingCallback != null) { leadingCallback!(); @@ -206,7 +207,7 @@ class ScrollAnimatedTitle extends StatefulWidget implements PreferredSizeWidget }); @override - Size get preferredSize => const Size.fromHeight(50); + Size get preferredSize => const Size.fromHeight(50.0); @override State createState() => _ScrollAnimatedTitleState(); @@ -252,9 +253,10 @@ class _ScrollAnimatedTitleState extends State { Widget build(BuildContext context) { final isRtl = Directionality.of(context) == TextDirection.rtl; return Container( - height: (widget.preferredSize.height - _fontSize / 2).h, + // height: (widget.preferredSize.height - _fontSize / 2).h, + height: 60.h, alignment: isRtl ? (widget.showBack ? Alignment.topRight : Alignment.centerRight) : (widget.showBack ? Alignment.topLeft : Alignment.centerLeft), - padding: EdgeInsets.fromLTRB(24, 0, 24, 0), + padding: EdgeInsets.fromLTRB(24.w, 0, 24.w, 0), child: Row( spacing: 4.h, children: [