adaptive_selector


Simple and robust Selector that adaptive for all platform.


Getting started

Basic usage

// Create list option
final options = SelectorType.values
  .map((e) => AdaptiveSelectorOption(label: e.name, value: e))
  .toList();
// Apply option to AdaptiveSelector
AdaptiveSelector(
  options: options,
  initialOption: options.first,
  type: SelectorType.menu,
  allowClear: false,
),

Async selector

AdaptiveSelector(
  options: asyncOptions,
  decoration: const InputDecoration(
    hintText: 'Select school',
  ),
  loading: loading,
  onSearch: handleSearch,
  hasMoreData: hasMore,
  onLoadMore: handleLoadMore,
),

Libraries

adaptive_selector