customDropdownSearchBuilder static method

Widget customDropdownSearchBuilder(
  1. BuildContext context,
  2. DropdownModel? item
)

Implementation

static Widget customDropdownSearchBuilder(
    BuildContext context, DropdownModel? item) {
  return ListTile(
    tileColor: Colors.transparent,
    visualDensity: VisualDensity.compact,
    contentPadding: EdgeInsets.zero,
    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 ?? "-",
    ),
    subtitle: item?.subtitle == null
        ? null
        : Texts.caption(
            item?.subtitle ?? "-",
            color: Get.theme.shadowColor,
          ),
  );
}