filterWhereSelectable<T> static method
Returns a filter function based on item
being selectable.
Implementation
static bool Function(T) filterWhereSelectable<T>(
Object isMaybeModel, [
bool defaultIfMissingInterface = true,
]) {
bool Function(T) isSelectable = (_) => defaultIfMissingInterface;
if (isMaybeModel is Selectable<T>) {
isSelectable = (option) {
return identical(
isMaybeModel.getSelectable(option),
SelectableOption.Selectable,
);
};
}
return isSelectable;
}