MultiSelectField<T> class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SelectFieldBase<
T> - MultiSelectField
- Available extensions
Constructors
-
MultiSelectField({Key? key, String? label, TextStyle? labelStyle, bool enabled = true, String? unselectedString, Duration duration = const Duration(milliseconds: 300), List<
T> ? initialValue, ScrollController? scrollController, required List<SelectFieldOption< options, ValueChanged<T> >List< ? onSelected, bool closeOnSelect = false, String? errorText, SelectTrailingBuilder? trailingBuilder, BorderRadius? borderRadius, bool? filled, bool enableSearch = false, Color? fillColor, bool overrideColor = false, List<T> >InputFeedbackText> ? feedback, double? maxWidth = 343, TextStyle? titleStyle, TextStyle? optionTileStyle, Widget titleBuilder(BuildContext context, List<SelectFieldOption< selected)?, bool initialValueComparison(List<T> >T> initialValue, T valueCompared)?, EdgeInsets fieldPadding = const EdgeInsets.symmetric(vertical: 12, horizontal: 16), bool autoFocusOnExpanded = true, bool closeOnUnfocus = true, bool collapsed = true, bool ensureVisibleOnNewOptions = true, Widget iconBuilder(BuildContext context, Widget defaultChild, bool expanded)?, void onSearchChange(String searchText)?, void onTransitionEnds(SelectFieldCollapseState state)?, AnimatedStateListItemBuilder<SelectFieldOption< ? optionsSeparatorBuilder, bool searchAutocorrect = true, String? searchHintText, TextInputType? searchKeyboardType, TextCapitalization searchTextCapitalization = TextCapitalization.none, bool makeOverlay = false, double collapsibleHeight = 350, Widget listMenuWrapperBuilder(Widget child)?, void onOptionsOpen()?, void onOptionsClosed()?})T> > -
const
Properties
- autoFocusOnExpanded → bool
-
finalinherited
- borderRadius → BorderRadius?
-
Radius of the field
finalinherited
- closeOnSelect → bool
-
If set to
truethis will auto-close the field when a user select an option of the dropdownfinalinherited - closeOnUnfocus → bool
-
finalinherited
- collapsed → bool
-
finalinherited
- collapsibleHeight → double
-
The height of the collapsible widget that has the options.
finalinherited
- duration → Duration
-
Modify the duration of the collapsing/uncollapsing animation
finalinherited
- enabled → bool
-
If false, all gesture detection will be disabled, this also affects color and transparency of the field
finalinherited
- enableSearch → bool
-
finalinherited
- ensureVisibleOnNewOptions → bool
-
If
true, the select field will ensure that it is visible within its scrollable parent whenever new options are provided. This is useful for dynamically loaded options, ensuring the user can always see the updated list without manual scrolling.finalinherited - errorText → String?
-
If you would like to show an error message this will render your message and change the background color of the field
finalinherited
-
feedback
→ List<
InputFeedbackText> ? -
If you would like to provide feedback for this field you can do so
finalinherited
- fieldPadding → EdgeInsets
-
Provide a way to customize default field content padding
finalinherited
- fillColor → Color?
-
The Color to be used instead of the default one which is inherited from an
InputThemefinalinherited - filled → bool?
-
If you would like to render this field with background color
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconBuilder → Widget Function(BuildContext context, Widget defaultChild, bool expanded)?
-
finalinherited
-
initialValue
→ List<
T> ? -
The option that should be pre-selected at the beginning
final
-
initialValueComparison
→ bool Function(List<
T> initialValue, T valueCompared)? -
Provide a custom comparator that will be used to identify the relation
between the initialValues and options provided
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
The label of this field
finalinherited
- labelStyle → TextStyle?
-
Define a custom style to be used in the label of the field
finalinherited
- listMenuWrapperBuilder → Widget Function(Widget child)?
-
Provide a custom builder for wrapping the list menu
finalinherited
- makeOverlay → bool
-
Make SelectField an overlay widget, this allows the inner dropdown to float
instead of expanding vertically.
finalinherited
- maxWidth → double?
-
Define max width constraints for this field
by default this going to fallback on Theme.decorationInputTheme.constraints
finalinherited
- onOptionsClosed → void Function()?
-
Callback when the options menu closes
finalinherited
- onOptionsOpen → void Function()?
-
Callback when the options menu opens
finalinherited
- onSearchChange → void Function(String searchText)?
-
finalinherited
-
onSelected
→ ValueChanged<
List< ?T> > -
Callback that is triggered each time the user selects an option
final
- onTransitionEnds → void Function(SelectFieldCollapseState state)?
-
finalinherited
-
options
→ List<
SelectFieldOption< T> > -
Provide the options to be used
finalinherited
-
finalinherited
-
optionsSeparatorBuilder
→ AnimatedStateListItemBuilder<
SelectFieldOption< ?T> > -
Called, as needed, to build list item separator.
By default this just adds a divider
finalinherited
- optionTileStyle → TextStyle?
-
Provide a custom text style to be used on the option list tiles
finalinherited
- overrideColor → bool
-
By default, specifying a fillColor will only apply on default state of th field, but will not override when this field change to an error state or disabled
this change that behavior
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
Wether if you would like to implement a custom controller to be used on the option list-view
finalinherited
- searchAutocorrect → bool
-
finalinherited
- searchHintText → String?
-
finalinherited
- searchKeyboardType → TextInputType?
-
finalinherited
- searchTextCapitalization → TextCapitalization
-
finalinherited
-
titleBuilder
→ Widget Function(BuildContext context, List<
SelectFieldOption< selected)?T> > -
final
- titleStyle → TextStyle?
-
Provide a custom text style to be used on the field title
finalinherited
- trailingBuilder → SelectTrailingBuilder?
-
This provides a useful builder to be used instead of the default one, useful if you would like to customize the style of the trailing icon on each option
finalinherited
- unselectedString → String?
-
This text is used when no option have been selected
finalinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _MultiSelectFieldState< T> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
-
withGBInputWrapper(
{String? label, Widget? labelWidget, bool appendColonToLabel = true, TextStyle? labelStyle, String? errorText, bool hasError = false, List< InputFeedbackText> ? feedback, WrapWidgetBuilder? innerBoxWrapper, BoxConstraints? constraints}) → Widget -
Available on Widget, provided by the GBInputWrapperExtension extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited