BasfDropDownInput class

A BASF-styled dropdown input with support for unselected values

Inheritance

Constructors

BasfDropDownInput({required TextEditingController controller, required List<String> values, Key? key, String? labelText, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.end, bool isLoading = false, bool isDisabled = false, bool isMandatory = false, @Deprecated('Use controller value instead') String? initialValue, String unselectedText = 'Select value', bool allowUnselected = false, Color? itemColor(String)?, double? maxWidth, void onChanged(String?)?})
A BASF-styled dropdown input with support for unselected values
const

Properties

allowUnselected bool
Whether to allow unselected state
final
controller TextEditingController
Controller
final
crossAxisAlignment CrossAxisAlignment
Cross alignment
final
hashCode int
The hash code for this object.
no setterinherited
initialValue String?
Initial value for the dropdown initial value should be provided by controller
final
isDisabled bool
Blocks dropdown and colors in grey
final
isLoading bool
Whether or not the dropdown is loading
final
isMandatory bool
Whether or not the border is displayed in current theme's error color (e.g. red) if the field is empty
final
itemColor Color? Function(String)?
A function that allows us to change the color of the dropdown's items based on the value of the item
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelText String?
Label for the dropdown
final
mainAxisAlignment MainAxisAlignment
Main alignment
final
maxWidth double?
Set the width constrains of the dropdown, especially useful when placed in Row
final
onChanged → void Function(String?)?
Callback for when the value changes
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unselectedText String
Text to display for the unselected option
final
values List<String>
List of values
final

Methods

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

Operators

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