getOptionIn<T> static method

SelectableOption getOptionIn<T>(
  1. Object isMaybeModel,
  2. T item, [
  3. SelectableOption defaultIfMissingInterface = SelectableOption.Selectable
])

Returns the selectability of option item in isMaybeModel.

Implementation

static SelectableOption getOptionIn<T>(
  Object isMaybeModel,
  T item, [
  SelectableOption defaultIfMissingInterface = SelectableOption.Selectable,
]) {
  if (isMaybeModel is Selectable<T>) {
    return isMaybeModel.getSelectable(item);
  }
  return defaultIfMissingInterface;
}