StringSelectionOptions<T>.withOptionGroups constructor

StringSelectionOptions<T>.withOptionGroups(
  1. List<OptionGroup<T>> optionGroups, {
  2. ItemRenderer<T>? toFilterableString,
  3. StringSuggestionFilter<T>? suggestionFilter,
  4. ItemRenderer<String> sanitizeString = _stringFormatSuggestion,
  5. bool shouldSort = false,
  6. bool shouldFilterEmpty = true,
})

Implementation

StringSelectionOptions.withOptionGroups(List<OptionGroup<T>> optionGroups,
    {ItemRenderer<T>? toFilterableString,
    StringSuggestionFilter<T>? suggestionFilter,
    ItemRenderer<String> sanitizeString = _stringFormatSuggestion,
    bool shouldSort = false,
    bool shouldFilterEmpty = true})
    : _toFilterableString =
          toFilterableString ?? _defaultRenderer(sanitizeString),
      _shouldSort = shouldSort,
      _shouldFilterEmpty = shouldFilterEmpty,
      _sanitizeString = sanitizeString,
      super(optionGroups) {
  _suggestionFilter = suggestionFilter ?? filterOption;
}