customPopupSearchItemBuilder static method
Widget
customPopupSearchItemBuilder(
)
Implementation
static Widget customPopupSearchItemBuilder(
BuildContext context, DropdownModel? item, bool isSelected) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 5.h),
decoration: BoxDecoration(
border: Border.all(
color: isSelected
? Theme.of(context).primaryColor
: Get.theme.shadowColor,
),
borderRadius: BorderRadius.circular(10.r),
color: Get.theme.colorScheme.background,
),
child: ListTile(
tileColor: Colors.transparent,
visualDensity: VisualDensity.compact,
contentPadding: item?.subtitle != null
? null
: EdgeInsets.symmetric(horizontal: 16, vertical: 5.h),
leading: item?.urlImage == null
? null
: CachedNetworkImage(
width: 80.w,
height: 50,
imageUrl: item?.urlImage ?? "",
placeholder: (context, url) => LoadingBouncingLine.circle(
backgroundColor: Get.theme.primaryColor,
),
// errorWidget: (context, url, error) => Icon(Icons.error),
),
title: Texts.body2(
item?.name ?? "-",
textOverflow: TextOverflow.visible,
),
subtitle: item?.subtitle == null
? null
: Texts.caption(
item?.subtitle ?? "-",
color: Get.theme.shadowColor,
textOverflow: TextOverflow.visible,
),
// trailing: isSelected
// ? Icon(
// Icons.check_circle,
// color: Get.theme.primaryColor,
// )
// : Icon(
// Icons.circle_outlined,
// color: Get.theme.shadowColor,
// ),
),
);
}