SelectFieldBase<T> constructor
const
SelectFieldBase<T> ({
- Key? key,
- String? label,
- TextStyle? labelStyle,
- bool enabled = true,
- String? unselectedString,
- Duration duration = const Duration(milliseconds: 300),
- ScrollController? scrollController,
- required List<
SelectFieldOption< options,T> > - bool closeOnSelect = true,
- String? errorText,
- SelectTrailingBuilder? trailingBuilder,
- BorderRadius? borderRadius,
- bool? filled,
- bool enableSearch = false,
- Color? fillColor,
- bool overrideColor = false,
- List<
InputFeedbackText> ? feedback, - double? maxWidth,
- TextStyle? titleStyle,
- TextStyle? optionTileStyle,
- EdgeInsets fieldPadding = const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
- void onSearchChange(
- String searchText
- String? searchHintText,
- TextInputType? searchKeyboardType,
- bool searchAutocorrect = true,
- TextCapitalization searchTextCapitalization = TextCapitalization.none,
- bool collapsed = true,
- bool autoFocusOnExpanded = true,
- bool ensureVisibleOnNewOptions = true,
- void onTransitionEnds(
- SelectFieldCollapseState state
- Widget iconBuilder(
- BuildContext context,
- Widget defaultChild,
- bool expanded
- bool closeOnUnfocus = true,
- AnimatedStateListItemBuilder<
SelectFieldOption< ? optionsSeparatorBuilder,T> > - bool makeOverlay = false,
- double collapsibleHeight = 350,
- Widget listMenuWrapperBuilder(
- Widget child
Implementation
const SelectFieldBase({
Key? key,
// this.initialValue,
// this.onSelected,
this.label,
this.labelStyle,
this.enabled = true,
this.unselectedString,
this.duration = const Duration(milliseconds: 300),
this.scrollController,
required this.options,
this.closeOnSelect = true,
this.errorText,
this.trailingBuilder,
this.borderRadius,
this.filled,
this.enableSearch = false,
this.fillColor,
this.overrideColor = false,
this.feedback,
this.maxWidth,
this.titleStyle,
this.optionTileStyle,
this.fieldPadding = const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
this.onSearchChange,
this.searchHintText,
this.searchKeyboardType,
this.searchAutocorrect = true,
this.searchTextCapitalization = TextCapitalization.none,
this.collapsed = true,
this.autoFocusOnExpanded = true,
this.ensureVisibleOnNewOptions = true,
this.onTransitionEnds,
this.iconBuilder,
this.closeOnUnfocus = true,
this.optionsFooterBuilder,
this.optionsSeparatorBuilder,
this.makeOverlay = false,
this.collapsibleHeight = 350,
this.listMenuWrapperBuilder,
}) : assert(
overrideColor && fillColor != null || !overrideColor,
"You must provide a color in order to set 'overrideColor' as true",
),
super(key: key);