FormSelectItem class

This class represents a select form item (dropdown).

Inheritance

Constructors

FormSelectItem({required FormSelectFieldController selectFieldController, FormSelectItemType selectItemType = FormSelectItemType.dropdown, bool enableSearch = false, bool fillAllItems = true, bool addEmptyValue = true, bool allowAddNewValue = false, required dynamic emptyId, dynamic emptyTextValue, dynamic value, FormItemStyle? formItemStyle, required String label, List<FormValidator>? validators})

Properties

addEmptyValue bool
To add the empty value.
final
allowAddNewValue bool
To allow or not add a new value
final
emptyId → dynamic
empty identification
final
emptyTextValue → dynamic
default value.
final
enableSearch bool
To enable search or not (like autocomplete).
final
fillAllItems bool
To fill all items at the begins
final
focusNode FocusNode
finalinherited
formItemStyle FormItemStyle?
The item style
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
initialValue → dynamic
The item initial value
finalinherited
label String
The item label
finalinherited
onChangeListeners List<dynamic Function(dynamic)>
The collection of listeners to listen changes of the item value
getter/setter pairinherited
onChangeVisibilityListeners List<dynamic Function(dynamic)>
The collection of listeners to listen changes of the item visibility
getter/setter pairinherited
onError ↔ dynamic Function(List<String> msg)?
A callback function to send errors.
getter/setter pairinherited
onFilterChange ↔ dynamic Function(dynamic)?
A callback function to alert a filter change.
getter/setter pair
onRecordAudio Future<String?> Function(BuildContext context)?
A callback function to record audio and return the text
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectFieldController FormSelectFieldController
Controller of the item
getter/setter pair
selectItemType FormSelectItemType
getter/setter pair
validators List<FormValidator>?
Validators to apply to this item.
getter/setter pairinherited
value ↔ dynamic
The item current value
getter/setter pairinherited
valueFormat ↔ FormValueFormat?
getter/setter pairinherited

Methods

addOnChangeListener(dynamic onChange(dynamic)) → dynamic
Adds a listener of changes
inherited
addOnChangeVisibilityListener(dynamic onChange(dynamic)) → dynamic
Adds a listener of visibility changes
inherited
areEquals(dynamic value, dynamic anotherValue) bool
Compares 2 values
inherited
changeFilter(dynamic value) → dynamic
Changes the current filter (parent)
draw(BuildContext context) Widget
Draws the item
override
filter(dynamic value) → dynamic
focus(BuildContext context) → void
inherited
formatValue() String
Format the value to string
inherited
getDefaultValue() → dynamic
getErrorMessages() List<String>
Gets the error messages tied to the last validation
inherited
getValue() → dynamic
Gets current value
inherited
isEmpty() bool
Returns if the current value is empty or not.
override
isEqual(dynamic value) bool
Compares with other value
inherited
isVisible() bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseValue(dynamic value) → dynamic
Parses the value
inherited
scale({double scaleFactor = 1}) → void
inherited
setValue(dynamic value) → dynamic
Sets current value
inherited
setVisible(bool visible) → dynamic
inherited
toString() String
A string representation of this object.
inherited
validate({String msg = "Required"}) bool
Validates the current value
inherited

Operators

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