MultiSelectDropDown<T> class

Inheritance

Constructors

MultiSelectDropDown({Key? key, required OnOptionSelected<T>? onOptionSelected, required List<ValueItem<T>> options, void onOptionRemoved(int index, ValueItem<T> option)?, Color? selectedOptionTextColor, ChipConfig chipConfig = const ChipConfig(), SelectionType selectionType = SelectionType.multi, String hint = 'Select', Color? hintColor = Colors.grey, double? hintFontSize = 14.0, List<ValueItem<T>> selectedOptions = const [], List<ValueItem<T>> disabledOptions = const [], bool alwaysShowOptionIcon = false, TextStyle? optionTextStyle, Icon? selectedOptionIcon = const Icon(Icons.check), Color? selectedOptionBackgroundColor, Color? optionsBackgroundColor, Color? fieldBackgroundColor = Colors.white, double dropdownHeight = 200, bool showChipInSingleSelectMode = false, Icon? suffixIcon = const Icon(Icons.arrow_drop_down), Icon? clearIcon = const Icon(Icons.close_outlined, size: 14), Widget selectedItemBuilder(BuildContext, ValueItem<T>)?, Widget? optionSeparator, Decoration? inputDecoration, TextStyle? hintStyle, EdgeInsets? padding, Color? focusedBorderColor = Colors.black54, Color? borderColor = Colors.grey, double? borderWidth = 0.4, double? focusedBorderWidth = 0.4, double? borderRadius = 12.0, BorderRadiusGeometry? radiusGeometry, bool showClearIcon = true, int? maxItems, FocusNode? focusNode, MultiSelectController<T>? controller, bool searchEnabled = false, double? dropdownBorderRadius, double? dropdownMargin, Color? dropdownBackgroundColor, Color? searchBackgroundColor, String? searchLabel = 'Search'})
MultiSelectDropDown is a widget that allows the user to select multiple options from a list of options. It is a dropdown that allows the user to select multiple options.
const
MultiSelectDropDown.network({Key? key, required OnOptionSelected<T>? onOptionSelected, required NetworkConfig? networkConfig, required Future<List<ValueItem<T>>> responseParser(dynamic)?, void onOptionRemoved(int index, ValueItem<T> option)?, Widget responseErrorBuilder(BuildContext, dynamic)?, Color? selectedOptionTextColor, ChipConfig chipConfig = const ChipConfig(), SelectionType selectionType = SelectionType.multi, String hint = 'Select', Color? hintColor = Colors.grey, double? hintFontSize = 14.0, List<ValueItem<T>> selectedOptions = const [], List<ValueItem<T>> disabledOptions = const [], bool alwaysShowOptionIcon = false, TextStyle? optionTextStyle, Icon? selectedOptionIcon = const Icon(Icons.check), Color? selectedOptionBackgroundColor, Color? optionsBackgroundColor, Color? fieldBackgroundColor = Colors.white, double dropdownHeight = 200, bool showChipInSingleSelectMode = false, Icon? suffixIcon = const Icon(Icons.arrow_drop_down), Icon? clearIcon = const Icon(Icons.close_outlined, size: 14), Widget selectedItemBuilder(BuildContext, ValueItem<T>)?, Widget? optionSeparator, Decoration? inputDecoration, TextStyle? hintStyle, EdgeInsets? padding, Color? borderColor = Colors.grey, Color? focusedBorderColor = Colors.black54, double? borderWidth = 0.4, double? focusedBorderWidth = 0.4, double? borderRadius = 12.0, BorderRadiusGeometry? radiusGeometry, bool showClearIcon = true, int? maxItems, FocusNode? focusNode, MultiSelectController<T>? controller, bool searchEnabled = false, double? dropdownBorderRadius, double? dropdownMargin, Color? dropdownBackgroundColor, Color? searchBackgroundColor, String? searchLabel = 'Search'})
Constructor for MultiSelectDropDown that fetches the options from a network call. networkConfig is the configuration for the network call. responseParser is the parser that is used to parse the response from the network call. responseErrorBuilder is the builder that is used to build the error widget when the network call fails.
const

Properties

alwaysShowOptionIcon bool
final
borderColor Color?
final
borderRadius double?
final
borderWidth double?
final
chipConfig ChipConfig
final
clearIcon Icon?
final
controller MultiSelectController<T>?
Controller for the dropdown controller is the controller for the dropdown. It can be used to programmatically open and close the dropdown.
final
disabledOptions List<ValueItem<T>>
final
final
final
final
final
fieldBackgroundColor Color?
final
focusedBorderColor Color?
final
focusedBorderWidth double?
final
focusNode FocusNode?
focus node
final
hashCode int
The hash code for this object.
no setterinherited
hint String
final
hintColor Color?
final
hintFontSize double?
final
hintStyle TextStyle?
final
inputDecoration Decoration?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxItems int?
final
networkConfig NetworkConfig?
final
onOptionRemoved → (void Function(int index, ValueItem<T> option)?)
onOptionRemoved is the callback that is called when an option is removed.The callback takes two arguments, the index of the removed option and the removed option. This will be called only when the delete icon is clicked on the option chip.
final
onOptionSelected OnOptionSelected<T>?
final
options List<ValueItem<T>>
final
optionsBackgroundColor Color?
final
optionSeparator Widget?
final
optionTextStyle TextStyle?
final
padding EdgeInsets?
final
radiusGeometry BorderRadiusGeometry?
final
responseErrorBuilder → (Widget Function(BuildContext, dynamic)?)
final
responseParser → (Future<List<ValueItem<T>>> Function(dynamic)?)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchBackgroundColor Color?
final
searchEnabled bool
Enable search searchEnabled is the flag to enable search in dropdown. It is used to show search bar in dropdown.
final
searchLabel String?
Search label searchLabel is the label for search bar in dropdown.
final
selectedItemBuilder → (Widget Function(BuildContext, ValueItem<T>)?)
final
selectedOptionBackgroundColor Color?
final
selectedOptionIcon Icon?
final
selectedOptions List<ValueItem<T>>
final
selectedOptionTextColor Color?
final
selectionType SelectionType
final
showChipInSingleSelectMode bool
final
showClearIcon bool
final
suffixIcon Icon?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MultiSelectDropDown<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}) 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

Operators

operator ==(Object other) bool
The equality operator.
inherited