renderClearIcon method
Implementation
Widget? renderClearIcon() {
if (searchTextController!.text.isNotEmpty) {
return InkWell(
onTap: () {
searchTextController?.clear();
filterList(searchTextController?.text ?? '');
},
child: Icon(
Icons.clear,
size: defaultSuffixIconSize,
color: defaultSuffixIconColor,
),
);
} else if (displaySearchIcon) {
return Icon(
Icons.search,
size: defaultSuffixIconSize,
color: defaultSuffixIconColor,
);
}
return null;
}