options library

Classes

DefaultOptionViewHandler<K, T>
KeyedOptionsHandler<K, T>
A base interface for helping to populate drop-downs and typeaheads. There are a couple of common mixins to cut down on boilerplate:
OptionHandlerPair<K, T>
OptionsHandler<T>
A base class for helping to populate drop-downs and typeaheads.
OptionsService
SmartDateOptionsHandler
TypeaheadService
Service that contains all registered typeahead handlers. Works with OptionService

Enums

OptionMode

Mixins

AlwaysFilterSearchOptionsMixin<K, T>
Used when your service always filters, and listAllOptions should just execute an empty search
DefaultOptionViewMixin2<K, T>
InMemorySearchOptionsMixin<K, T>

Constants

kDefaultNumOptions → const int

Properties

optionViewService TypeaheadService
no setter
smartDateTypeaheadHandler → TypeaheadOptionsAndHandler<SmartDateQueryResult, SmartDateQueryResult>
final

Functions

defaultOptionViewHandler<K, T>({Icon? prefixIcon, String? placeholder, String noOptionsLabel = "N/A", OptionValueType? valueType, TypeaheadFocusMode? focusMode, bool showExpand = false, RenderSuggestionTile<K, T>? renderSuggestionTile}) → TypeaheadOptionsAndHandler<K, T>
noopHandler<T>(String? key) OptionsHandler<T?>
noopKeyHandler<K, T>(String? key) KeyedOptionsHandler<K, T>
openPicker<K, V>(BuildContext context, {dynamic title, dynamic content, required Set<KeyedOption<K, V>> options}) Future<KeyedOption<K, V>?>
renderSimpleTypeaheadOption<K, T>({required SuggestionElement<K, T> title, SuggestionElement<K, T>? icon, bool isAdhocCreator = false}) RenderSuggestionTile<K, T>
Makes it easy to produce a formatted suggestion tile by proving a SuggestionElement callback for the title and icon
showPicker<K, V>(BuildContext context, {dynamic title, dynamic content, required Set<KeyedOption<K, V>> options, dynamic extraOptions}) Future<KeyedOption<K, V>?>

Typedefs

AdhocBuilder<T> = AdhocOption<T> Function(String message)
RenderSuggestionTile<K, T> = Widget Function(BuildContext context, KeyedOption<K, T> suggestion, {bool? isSelected, VoidCallback? onTap, SelectOption<K, T>? selectOption})
SuggestionElement<K, T> = dynamic Function(KeyedOption<K, T> suggestion)