|
|
|
|
@ -24,6 +24,7 @@ class AppCustomChipWidget extends StatelessWidget {
|
|
|
|
|
this.padding = EdgeInsets.zero,
|
|
|
|
|
this.onChipTap,
|
|
|
|
|
this.labelPadding,
|
|
|
|
|
this.onDeleteTap,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
final String? labelText;
|
|
|
|
|
@ -42,7 +43,7 @@ class AppCustomChipWidget extends StatelessWidget {
|
|
|
|
|
final EdgeInsets? padding;
|
|
|
|
|
final EdgeInsetsDirectional? labelPadding;
|
|
|
|
|
final void Function()? onChipTap;
|
|
|
|
|
|
|
|
|
|
final void Function()? onDeleteTap;
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final iconS = iconSize ?? 12.w;
|
|
|
|
|
@ -78,12 +79,13 @@ class AppCustomChipWidget extends StatelessWidget {
|
|
|
|
|
side: BorderSide(color: AppColors.transparent, width: 1.5),
|
|
|
|
|
),
|
|
|
|
|
deleteIcon: deleteIcon?.isNotEmpty == true
|
|
|
|
|
? Utils.buildSvgWithAssets(
|
|
|
|
|
? InkWell(onTap: onDeleteTap,child:Utils.buildSvgWithAssets(
|
|
|
|
|
icon: deleteIcon!,
|
|
|
|
|
width: iconS,
|
|
|
|
|
height: iconS,
|
|
|
|
|
iconColor: deleteIconHasColor ? deleteIconColor : null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
),)
|
|
|
|
|
: null,
|
|
|
|
|
onDeleted: deleteIcon?.isNotEmpty == true ? () {} : null,
|
|
|
|
|
)
|
|
|
|
|
@ -100,7 +102,7 @@ class AppCustomChipWidget extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
labelPadding: labelPadding ?? EdgeInsetsDirectional.only(start: 2.w, end: deleteIcon?.isNotEmpty == true ? 2.w : 8.w),
|
|
|
|
|
deleteIcon: deleteIcon?.isNotEmpty == true
|
|
|
|
|
? Utils.buildSvgWithAssets(icon: deleteIcon!, width: iconS, height: iconS, iconColor: deleteIconHasColor ? deleteIconColor : null)
|
|
|
|
|
? InkWell(onTap: onDeleteTap,child: Utils.buildSvgWithAssets(icon: deleteIcon!, width: iconS, height: iconS, iconColor: deleteIconHasColor ? deleteIconColor : null))
|
|
|
|
|
: null,
|
|
|
|
|
onDeleted: deleteIcon?.isNotEmpty == true ? () {} : null,
|
|
|
|
|
),
|
|
|
|
|
|