CLInputGroup<T> class

"Input group" / "segmented input" — a single visual chrome containing a leading dropdown and a trailing text field, sharing border, radius, height and focus state. Common pattern (Bootstrap input-group, Tailwind "addon", etc.) used for typed inputs that require a category selector.

Example:

CLInputGroup<ContactableType>(
  selected: ContactableType.email,
  items: [
    CLInputGroupItem(value: ContactableType.email, label: 'Email'),
    CLInputGroupItem(value: ContactableType.phone, label: 'Telefono'),
  ],
  onChanged: (v) => setState(() => type = v!),
  controller: textCtrl,
  hintText: 'email@esempio.it',
)
Inheritance
Available extensions

Constructors

CLInputGroup({Key? key, required T? selected, required List<CLInputGroupItem<T>> items, required TextEditingController controller, ValueChanged<T?>? onChanged, FocusNode? focusNode, String? hintText, TextInputType? keyboardType, bool enabled = true, double? dropdownWidth, bool hasError = false, ValueChanged<String>? onTextChanged, ValueChanged<String>? onSubmitted})
const

Properties

controller TextEditingController
Text editing controller for the input segment.
final
Optional fixed width for the dropdown segment. If null (default), the segment auto-sizes to the widest item label.
final
enabled bool
Whether the input segment is enabled. Both segments respect this flag.
final
focusNode FocusNode?
Optional focus node for the input segment.
final
hasError bool
Whether to show an error border (theme.danger).
final
hashCode int
The hash code for this object.
no setterinherited
hintText String?
Hint text shown when the input is empty.
final
items List<CLInputGroupItem<T>>
Available dropdown options.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType TextInputType?
Optional input keyboard type.
final
onChanged ValueChanged<T?>?
Invoked when the dropdown selection changes. If null the dropdown is rendered read-only.
final
onSubmitted ValueChanged<String>?
Invoked when text submitted (Enter key).
final
onTextChanged ValueChanged<String>?
Invoked on text changes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected → T?
Currently selected dropdown value.
final

Methods

animateOnActionTrigger(AnimationInfo animationInfo, {bool hasBeenTriggered = false}) Widget

Available on Widget, provided by the AnimatedWidgetExtension extension

animateOnPageLoad(AnimationInfo animationInfo) Widget

Available on Widget, provided by the AnimatedWidgetExtension extension

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

Operators

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