setIsSelectedBySelectedList method

void setIsSelectedBySelectedList(
  1. List<T> selectedList, {
  2. required bool compareSelectedData(
    1. T,
    2. T
    ),
})

function to check if current item data, same as prev selected data

Implementation

void setIsSelectedBySelectedList(List<T> selectedList,
    {required bool Function(T, T) compareSelectedData}) {
  if (selectedList.isEmpty) return;
  isSelected = checkIsDataOnSelectedList(data, selectedList,
      compareSelectedData: compareSelectedData);
}