Simple and robust Selector that adaptive for all platform.
// 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,
),
AdaptiveSelector(
options: asyncOptions,
decoration: const InputDecoration(
hintText: 'Select school',
),
loading: loading,
onSearch: handleSearch,
hasMoreData: hasMore,
onLoadMore: handleLoadMore,
),