SelectFieldBase<T> constructor

const SelectFieldBase<T>({
  1. Key? key,
  2. String? label,
  3. TextStyle? labelStyle,
  4. bool enabled = true,
  5. String? unselectedString,
  6. Duration duration = const Duration(milliseconds: 300),
  7. ScrollController? scrollController,
  8. required List<SelectFieldOption<T>> options,
  9. bool closeOnSelect = true,
  10. String? errorText,
  11. SelectTrailingBuilder? trailingBuilder,
  12. BorderRadius? borderRadius,
  13. bool? filled,
  14. bool enableSearch = false,
  15. Color? fillColor,
  16. bool overrideColor = false,
  17. List<InputFeedbackText>? feedback,
  18. double? maxWidth,
  19. TextStyle? titleStyle,
  20. TextStyle? optionTileStyle,
  21. EdgeInsets fieldPadding = const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
  22. void onSearchChange(
    1. String searchText
    )?,
  23. String? searchHintText,
  24. TextInputType? searchKeyboardType,
  25. bool searchAutocorrect = true,
  26. TextCapitalization searchTextCapitalization = TextCapitalization.none,
  27. bool collapsed = true,
  28. bool autoFocusOnExpanded = true,
  29. bool ensureVisibleOnNewOptions = true,
  30. void onTransitionEnds(
    1. SelectFieldCollapseState state
    )?,
  31. Widget iconBuilder(
    1. BuildContext context,
    2. Widget defaultChild,
    3. bool expanded
    )?,
  32. bool closeOnUnfocus = true,
  33. Widget optionsFooterBuilder(
    1. BuildContext context
    )?,
  34. AnimatedStateListItemBuilder<SelectFieldOption<T>>? optionsSeparatorBuilder,
  35. bool makeOverlay = false,
  36. double collapsibleHeight = 350,
  37. Widget listMenuWrapperBuilder(
    1. 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);