directional padding and alignment

pull/55/head
taha.alam 1 month ago
parent 4974121061
commit 27a0632d6d

@ -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 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}) => 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); Widget toExpanded({int flex = 1}) => Expanded(flex: flex, child: this);

@ -77,7 +77,7 @@ class RegionListItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Align( Align(
alignment: Alignment.centerLeft, alignment: AlignmentDirectional.centerStart,
child: Text( child: Text(
title, title,
style: TextStyle( style: TextStyle(

@ -72,9 +72,9 @@ class AppCustomChipWidget extends StatelessWidget {
// padding: EdgeInsets.all(0.0), // padding: EdgeInsets.all(0.0),
padding: padding, padding: padding,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
labelPadding: EdgeInsets.only( labelPadding: EdgeInsetsDirectional.only(
left: -4.h, start: -4.h,
right: deleteIcon?.isNotEmpty == true ? 2.h : 8.h), end: deleteIcon?.isNotEmpty == true ? 2.h : 8.h),
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
shape: shape, shape: shape,
deleteIcon: deleteIcon?.isNotEmpty == true deleteIcon: deleteIcon?.isNotEmpty == true
@ -96,9 +96,9 @@ class AppCustomChipWidget extends StatelessWidget {
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
shape: shape, shape: shape,
labelPadding: EdgeInsets.only( labelPadding: EdgeInsetsDirectional.only(
left: 8.h, start: 8.h,
right: deleteIcon?.isNotEmpty == true ? -2.h : 8.h), end: deleteIcon?.isNotEmpty == true ? -2.h : 8.h),
deleteIcon: deleteIcon?.isNotEmpty == true deleteIcon: deleteIcon?.isNotEmpty == true
? Utils.buildSvgWithAssets( ? Utils.buildSvgWithAssets(
icon: deleteIcon!, icon: deleteIcon!,

Loading…
Cancel
Save