checkIsDataOnSelectedList method
function to check if data in selected list
Implementation
bool checkIsDataOnSelectedList(T data, List<T> selectedList,
{required bool Function(T, T) compareSelectedData}) {
if (selectedList.isEmpty) return false;
return selectedList.any((e) => compareSelectedData(e, data));
}