AppKitComboBox class
A custom combo box widget with customizable properties.
The AppKitComboBox widget allows users to select a value from a dropdown list or enter a custom value. The appearance and behavior of the combo box can be customized using various properties.
Example usage:
AppKitComboBox(
value: 'Option 1',
items: ['Option 1', 'Option 2', 'Option 3'],
onChanged: (newValue) {
print('Selected value: $newValue');
},
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AppKitComboBox
Constructors
-
AppKitComboBox.new({Key? key, AppKitControlSize controlSize = AppKitControlSize.regular, List<
String> ? items, String? placeholder, String? value, AppKitComboBoxStyle style = AppKitComboBoxStyle.bordered, Color? color, TextAlign textAlign = TextAlign.start, String? semanticLabel, FocusNode? focusNode, bool canRequestFocus = true, bool autofocus = false, bool autocompletes = false, ValueChanged<String> ? onChanged, bool enabled = true, AppKitTextFieldBehavior behavior = AppKitTextFieldBehavior.editable, int? maxLength, MaxLengthEnforcement? maxLengthEnforcement, List<TextInputFormatter> ? inputFormatters, TextInputType inputType = TextInputType.text, double? maxItemsMenuHeight}) -
Creates an AppKitComboBox widget.
const
Properties
- autocompletes → bool
-
Whether the combo box should autocomplete user input.
final
- autofocus → bool
-
Whether the combo box should automatically focus when first displayed.
final
- behavior → AppKitTextFieldBehavior
-
The behavior of the text field inside the combo box.
final
- canRequestFocus → bool
-
Whether the combo box can request focus.
final
- color → Color?
-
The color of the combo box.
final
- controlSize → AppKitControlSize
-
The size of the control.
final
- enabled → bool
-
Whether the combo box is enabled.
final
- focusNode → FocusNode?
-
The focus node for the combo box.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inputFormatters
→ List<
TextInputFormatter> ? -
The input formatters for the text field.
final
- inputType → TextInputType
-
The type of input for the text field.
final
-
items
→ List<
String> ? -
The list of items to display in the dropdown.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxItemsMenuHeight → double?
-
The maximum height of the dropdown menu.
final
- maxLength → int?
-
The maximum length of the input.
final
- maxLengthEnforcement → MaxLengthEnforcement?
-
The enforcement policy for the maximum length.
final
-
onChanged
→ ValueChanged<
String> ? -
Called when the user changes the combo box's value.
final
- placeholder → String?
-
The placeholder text to display when no value is selected.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
The semantic label for the combo box.
final
- style → AppKitComboBoxStyle
-
The style of the combo box.
final
- textAlign → TextAlign
-
The alignment of the text inside the combo box.
final
- value → String?
-
The current value of the combo box.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AppKitComboBox> -
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