CLTextField class

Inheritance
Available extensions

Constructors

CLTextField({Key? key, required TextEditingController controller, required String labelText, String? hintText, FocusNode? focusNode, int? maxLines = 1, TextInputType inputType = TextInputType.text, bool isObscured = false, bool isEnabled = true, Widget? prefixIcon, BoxConstraints? prefixIconConstraints, Widget? suffixIcon, bool isTextArea = false, bool isRequired = false, bool isRounded = false, bool isReadOnly = false, GestureTapCallback? onTap, Future onChanged(String value)?, List<FormFieldValidator<String>>? validators, dynamic onColorPicked(String)?, dynamic onFilePicked(File?)?, dynamic onDateTimeSelected(DateTime?)?, dynamic onTimeSelected(TimeOfDay?)?, TimeOfDay? initialSelectedTime, DateTime? initialSelectedDateTime, bool withTime = false, bool withoutDay = false, String? initValue, List<TextInputFormatter>? inputFormatters, bool onlyTime = false, Color? fillColor, CLDateFieldType? dateFieldType, bool capitalize = false, bool isCompact = false, bool recessed = false})
const
CLTextField.colorPicker({Key? key, required TextEditingController controller, required String labelText, required dynamic onColorPicked(String), GestureTapCallback? onTap, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, bool isEnabled = true, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.currency({Key? key, required TextEditingController controller, required String labelText, bool isReadOnly = false, GestureTapCallback? onTap, FocusNode? focusNode, Future onChanged(String value)?, bool isRequired = false, IconAlignment iconAlignment = IconAlignment.start, bool isRounded = false, bool isEnabled = true, String? initValue, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.date({Key? key, required TextEditingController controller, required String labelText, GestureTapCallback? onTap, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, bool isEnabled = true, bool withTime = false, DateTime? initialSelectedDateTime, required dynamic onDateTimeSelected(DateTime?), Color? fillColor, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.dateTime({Key? key, required TextEditingController controller, required String labelText, GestureTapCallback? onTap, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, bool isEnabled = true, DateTime? initialSelectedDateTime, required dynamic onDateTimeSelected(DateTime?), Color? fillColor, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.disabled({Key? key, required TextEditingController controller, required String labelText, GestureTapCallback? onTap, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.filePicker({Key? key, required TextEditingController controller, required String labelText, GestureTapCallback? onTap, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, bool isEnabled = true, required dynamic onFilePicked(File?), List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.icon({Key? key, required TextEditingController controller, required String labelText, required dynamic icon, bool isReadOnly = false, GestureTapCallback? onTap, FocusNode? focusNode, Future onChanged(String value)?, bool isRequired = false, IconAlignment iconAlignment = IconAlignment.start, bool isRounded = false, bool isEnabled = true, String? initValue, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.month({Key? key, required TextEditingController controller, required String labelText, GestureTapCallback? onTap, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, bool isEnabled = true, DateTime? initialSelectedDateTime, required dynamic onDateTimeSelected(DateTime?), Color? fillColor, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.number({Key? key, required TextEditingController controller, required String labelText, bool isReadOnly = false, GestureTapCallback? onTap, FocusNode? focusNode, Future onChanged(String value)?, bool isRequired = false, IconAlignment iconAlignment = IconAlignment.start, bool isRounded = false, bool isEnabled = true, List<FormFieldValidator<String>>? validators, String? initValue, bool withDecimal = false, bool isCompact = false})
factory
CLTextField.password({Key? key, required TextEditingController controller, required String labelText, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, bool isEnabled = true, dynamic prefix, dynamic suffix, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.rightLeftIcon({Key? key, required TextEditingController controller, required String labelText, required dynamic leftIcon, required dynamic rightIcon, GestureTapCallback? onTap, FocusNode? focusNode, Future onChanged(String value)?, bool isRequired = false, bool isRounded = false, bool isEnabled = true, String? initValue, bool isReadOnly = false, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.rounded({Key? key, required TextEditingController controller, required String labelText, GestureTapCallback? onTap, FocusNode? focusNode, Future onChanged(String value)?, bool isRequired = false, bool isEnabled = true, bool isReadOnly = false, String? initValue, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.search({Key? key, required TextEditingController controller, String labelText = 'Cerca', FocusNode? focusNode, Future onChanged(String value)?, bool isEnabled = true, bool isCompact = false, bool isRounded = true})
Campo ricerca stile Foundation: recess L2 (fill grigio incassato), icona search, pill arrotondata. Per toolbar di tabelle/liste — NON per i form.
factory
CLTextField.textArea({Key? key, required TextEditingController controller, required String labelText, String? hintText, GestureTapCallback? onTap, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, bool isEnabled = true, String? initValue, Future onChanged(String value)?, List<FormFieldValidator<String>>? validators})
factory
CLTextField.time({Key? key, required TextEditingController controller, required String labelText, GestureTapCallback? onTap, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, bool isEnabled = true, TimeOfDay? initialSelectedTime, required dynamic onTimeSelected(TimeOfDay?), dynamic onDateTimeSelected(DateTime?)?, Color? fillColor, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory
CLTextField.year({Key? key, required TextEditingController controller, required String labelText, GestureTapCallback? onTap, bool isReadOnly = false, bool isRequired = false, bool isRounded = false, bool isEnabled = true, DateTime? initialSelectedDateTime, required dynamic onDateTimeSelected(DateTime?), Color? fillColor, List<FormFieldValidator<String>>? validators, bool isCompact = false})
factory

Properties

capitalize → bool
final
controller → TextEditingController
final
dateFieldType → CLDateFieldType?
final
fillColor → Color?
final
focusNode → FocusNode?
final
hashCode → int
The hash code for this object.
no setterinherited
hintText → String?
Placeholder INTERNO al campo (muted), separato dalla labelText. Se null il campo resta vuoto finché non si digita.
final
initialSelectedDateTime → DateTime?
final
initialSelectedTime → TimeOfDay?
final
initValue → String?
final
inputFormatters → List<TextInputFormatter>?
final
inputType → TextInputType
final
isCompact → bool
Se true, altezza 32px e padding ridotti (token inputHeightCompact).
final
isEnabled → bool
final
isObscured → bool
final
isReadOnly → bool
final
isRequired → bool
final
isRounded → bool
final
isTextArea → bool
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelText → String
Label PERSISTENTE mostrata SOPRA il campo (stile shadcn). In errore diventa danger. Non è più il placeholder interno (usa hintText).
final
maxLines → int?
final
onChanged → Future Function(String value)?
final
onColorPicked → dynamic Function(String)?
final
onDateTimeSelected → dynamic Function(DateTime?)?
final
onFilePicked → dynamic Function(File?)?
final
onlyTime → bool
final
onTap → GestureTapCallback?
final
onTimeSelected → dynamic Function(TimeOfDay?)?
final
prefixIcon → Widget?
final
prefixIconConstraints → BoxConstraints?
final
recessed → bool
Stile "recess" L2 (Foundation): fill grigio tertiaryBackground incassato, nessun bordo a riposo, solo ring al focus. Per campi ricerca dentro toolbar/tabella. In un form i campi restano bianchi+bordo (default false). NB: Flutter non ha inset-shadow nativa → l'incasso è dato dal tono più scuro.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
suffixIcon → Widget?
final
validators → List<FormFieldValidator<String>>?
final
withoutDay → bool
final
withTime → bool
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() → CLTextFieldState
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