From 27a0632d6d062368b295a2bad55494e29c297eab Mon Sep 17 00:00:00 2001 From: "taha.alam" Date: Mon, 22 Sep 2025 16:18:11 +0300 Subject: [PATCH] directional padding and alignment --- lib/extensions/widget_extensions.dart | 2 +- .../widgets/region_bottomsheet/region_list_item.dart | 2 +- lib/widgets/chip/app_custom_chip_widget.dart | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart index 26a1442..e2df742 100644 --- a/lib/extensions/widget_extensions.dart +++ b/lib/extensions/widget_extensions.dart @@ -22,7 +22,7 @@ extension WidgetExtensions on Widget { Widget paddingSymmetrical(double horizontal, double vertical) => Padding(padding: EdgeInsets.symmetric(horizontal: horizontal, vertical: vertical), child: this); Widget paddingOnly({double left = 0.0, double right = 0.0, double top = 0.0, double bottom = 0.0}) => - Padding(padding: EdgeInsets.only(left: left, right: right, top: top, bottom: bottom), child: this); + Padding(padding: EdgeInsetsDirectional.only(start: left, end: right, top: top, bottom: bottom), child: this); Widget toExpanded({int flex = 1}) => Expanded(flex: flex, child: this); diff --git a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart index 64263de..ab9cd9b 100644 --- a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart +++ b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart @@ -77,7 +77,7 @@ class RegionListItem extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Align( - alignment: Alignment.centerLeft, + alignment: AlignmentDirectional.centerStart, child: Text( title, style: TextStyle( diff --git a/lib/widgets/chip/app_custom_chip_widget.dart b/lib/widgets/chip/app_custom_chip_widget.dart index b29f6e6..a6e1817 100644 --- a/lib/widgets/chip/app_custom_chip_widget.dart +++ b/lib/widgets/chip/app_custom_chip_widget.dart @@ -72,9 +72,9 @@ class AppCustomChipWidget extends StatelessWidget { // padding: EdgeInsets.all(0.0), padding: padding, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - labelPadding: EdgeInsets.only( - left: -4.h, - right: deleteIcon?.isNotEmpty == true ? 2.h : 8.h), + labelPadding: EdgeInsetsDirectional.only( + start: -4.h, + end: deleteIcon?.isNotEmpty == true ? 2.h : 8.h), backgroundColor: backgroundColor, shape: shape, deleteIcon: deleteIcon?.isNotEmpty == true @@ -96,9 +96,9 @@ class AppCustomChipWidget extends StatelessWidget { padding: EdgeInsets.all(0.0), backgroundColor: backgroundColor, shape: shape, - labelPadding: EdgeInsets.only( - left: 8.h, - right: deleteIcon?.isNotEmpty == true ? -2.h : 8.h), + labelPadding: EdgeInsetsDirectional.only( + start: 8.h, + end: deleteIcon?.isNotEmpty == true ? -2.h : 8.h), deleteIcon: deleteIcon?.isNotEmpty == true ? Utils.buildSvgWithAssets( icon: deleteIcon!,