From d256eec3929ddeee5354c80be95cb96f957bf5a4 Mon Sep 17 00:00:00 2001 From: aamir-csol Date: Mon, 8 Dec 2025 10:50:33 +0300 Subject: [PATCH] medical file changes --- lib/core/utils/utils.dart | 2 +- lib/extensions/string_extensions.dart | 2 +- .../medical_file/medical_file_page.dart | 22 ++++--- lib/widgets/expandable_list_widget.dart | 2 +- lib/widgets/input_widget.dart | 58 ++++++++++--------- 5 files changed, 46 insertions(+), 40 deletions(-) diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart index e2c11d4..0125f00 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -330,7 +330,7 @@ class Utils { repeat: false, reverse: false, frameRate: FrameRate(60), width: width.h, height: height.h, fit: BoxFit.fill), SizedBox(height: 16.h), (noDataText ?? LocaleKeys.noDataAvailable.tr()) - .toText16(weight: FontWeight.w500, color: AppColors.greyTextColor, isCenter: true) + .toText14(weight: FontWeight.w500, color: AppColors.greyTextColor, isCenter: true) .paddingSymmetrical(64.w, 0.h), SizedBox(height: 16.h), callToActionButton diff --git a/lib/extensions/string_extensions.dart b/lib/extensions/string_extensions.dart index 250453d..328ced5 100644 --- a/lib/extensions/string_extensions.dart +++ b/lib/extensions/string_extensions.dart @@ -263,7 +263,7 @@ extension EmailValidator on String { style: TextStyle(fontSize: 19.f, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, color: color ?? AppColors.blackColor, letterSpacing: -0.4), ); - Widget toText20({Color? color, FontWeight? weight, bool isBold = false}) => Text( + Widget toText20({Color? color, FontWeight? weight, bool isBold = false, }) => Text( this, style: TextStyle( fontSize: 20.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? AppColors.blackColor, letterSpacing: -0.4), diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index e1d4ce7..538687c 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -245,39 +245,43 @@ class _MedicalFilePageState extends State { isBorderAllowed: false, isAllowLeadingIcon: true, padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h), - leadingIcon: AppAssets.student_card, + leadingIcon: AppAssets.search_icon, + hintColor: AppColors.textColor, ).paddingSymmetrical(24.w, 0.0), SizedBox(height: 16.h), // Using CustomExpandableList CustomExpandableList( expansionMode: ExpansionMode.exactlyOne, dividerColor: Color(0xFF2B353E1A), - + itemPadding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.h), items: [ ExpandableListItem( - title: "Medical Services".toText20(weight: FontWeight.w500), + title: "Medical Services".toText18(weight: FontWeight.w600), children: [ SizedBox(height: 10.h), getSelectedTabData(0), ], ), ExpandableListItem( - title: "Medical Reports".toText20( - weight: FontWeight.w500, + title: "Medical Reports".toText18( + weight: FontWeight.w600, ), + expandedBackgroundColor: Colors.transparent, children: [ SizedBox(height: 10.h), getSelectedTabData(2), ]), ExpandableListItem( - title: "Insurance & Payments".toText20(weight: FontWeight.w500), + title: "Insurance & Payments".toText18(weight: FontWeight.w600), + expandedBackgroundColor: Colors.transparent, children: [ SizedBox(height: 10.h), getSelectedTabData(1), ], ), ExpandableListItem( - title: "Tracker & Others".toText20(weight: FontWeight.w500), + title: "Tracker & Others".toText18(weight: FontWeight.w600), + expandedBackgroundColor: Colors.transparent, children: [ Text("Blood Report"), SizedBox(height: 8), @@ -481,9 +485,9 @@ class _MedicalFilePageState extends State { }, separatorBuilder: (BuildContext cxt, int index) => SizedBox(width: 12.h), ), - ).paddingSymmetrical(0.w, 0); + ).paddingSymmetrical(0.w, 0.h); }), - SizedBox(height: 24.h), + SizedBox(height: 10.h), "Lab & Radiology".needTranslation.toText16(weight: FontWeight.w500, letterSpacing: -0.2), SizedBox(height: 16.h), Row( diff --git a/lib/widgets/expandable_list_widget.dart b/lib/widgets/expandable_list_widget.dart index 21bbdf6..b948299 100644 --- a/lib/widgets/expandable_list_widget.dart +++ b/lib/widgets/expandable_list_widget.dart @@ -255,7 +255,7 @@ class ExpandableListTheme { return ExpandableListTheme( backgroundColor: Colors.transparent, - expandedBackgroundColor: Colors.grey.shade50, + expandedBackgroundColor: Colors.transparent, dividerColor: Colors.grey.shade300, defaultTrailingIcon: Icon( Icons.keyboard_arrow_down, diff --git a/lib/widgets/input_widget.dart b/lib/widgets/input_widget.dart index 4b3f091..c1a38ab 100644 --- a/lib/widgets/input_widget.dart +++ b/lib/widgets/input_widget.dart @@ -47,38 +47,40 @@ class TextInputWidget extends StatelessWidget { final bool isMultiline; final int minLines; final int maxLines; + final Color? hintColor; // final List countryList; // final Function(Country)? onCountryChange; - TextInputWidget( - {super.key, - required this.labelText, - required this.hintText, - this.controller, - this.onChange, - this.onCalendarTypeChanged, - this.prefix, - this.isEnable = true, - this.isBorderAllowed = true, - this.isAllowRadius = true, - this.isReadOnly = false, - this.keyboardType = TextInputType.number, - this.focusNode, - this.autoFocus = false, - this.padding, - this.isAllowLeadingIcon = false, - this.leadingIcon, - this.isCountryDropDown = false, - this.hasError = false, - this.errorMessage, - this.onCountryChange, - this.selectionType, - this.fontSize, - this.isWalletAmountInput = false, - this.suffix, - this.labelColor, + TextInputWidget({ + super.key, + required this.labelText, + required this.hintText, + this.controller, + this.onChange, + this.onCalendarTypeChanged, + this.prefix, + this.isEnable = true, + this.isBorderAllowed = true, + this.isAllowRadius = true, + this.isReadOnly = false, + this.keyboardType = TextInputType.number, + this.focusNode, + this.autoFocus = false, + this.padding, + this.isAllowLeadingIcon = false, + this.leadingIcon, + this.isCountryDropDown = false, + this.hasError = false, + this.errorMessage, + this.onCountryChange, + this.selectionType, + this.fontSize, + this.isWalletAmountInput = false, + this.suffix, + this.labelColor, this.onSubmitted, + this.hintColor, // multiline defaults this.isMultiline = false, this.minLines = 3, @@ -274,7 +276,7 @@ class TextInputWidget extends StatelessWidget { decoration: InputDecoration( isDense: true, hintText: hintText, - hintStyle: TextStyle(fontSize: 14.f, height: 21 / 16, fontWeight: FontWeight.w500, color: Color(0xff898A8D), letterSpacing: -0.75), + hintStyle: TextStyle(fontSize: 14.f, height: 21 / 16, fontWeight: FontWeight.w500, color: hintColor != null ? AppColors.textColor : Color(0xff898A8D), letterSpacing: -0.75), prefixIconConstraints: BoxConstraints(minWidth: 30.h), prefixIcon: prefix == null ? null : "+${prefix!}".toText14(letterSpacing: -1, color: AppColors.textColor, weight: FontWeight.w500), contentPadding: EdgeInsets.zero,