VoiceFormField class

A customizable form input field widget with support for:

  • Text input types
  • Password visibility toggle
  • Date picker
  • Voice input (via mic)
  • Custom validation
Inheritance

Constructors

VoiceFormField({Key? key, required TextEditingController controller, String? hint, int? height, int? width, int fontSize = 16, Color borderColor = Colors.blue, String? label, bool enableVoice = false, int? maxLines = 1, int? minLines = 1, int? errorMaxLines = 1, TextInputType? keyboardType, IconButton? suffixIconButton, bool? autofocus = false, bool? autocorrect = false, TextInputAction? textInputAction, AutovalidateMode? autoValidateMode, EdgeInsets? padding, InputBorder? enabledBorder, InputBorder? border, InputBorder? focusedErrorBorder, InputBorder? focusedBorder, InputBorder? errorBorder, InputBorder? disabledBorder, String? validator(String?)?, required FormFieldType fieldType, required String fieldId, dynamic onMicTap(String fieldId)?})
const

Properties

autocorrect bool?
Autofocus the field on load
final
autofocus bool?
Autofocus the field on load
final
autoValidateMode AutovalidateMode?
How to auto validate the field
final
border InputBorder?
Optional input border customizations
final
borderColor Color
Border color used when focused
final
controller TextEditingController
Controller for the input field
final
disabledBorder InputBorder?
Optional input border customizations
final
enabledBorder InputBorder?
Optional input border customizations
final
enableVoice bool
Enable or disable voice input mic
final
errorBorder InputBorder?
Optional input border customizations
final
errorMaxLines int?
Max/min/error lines for multi-line fields
final
fieldId String
A unique identifier used for voice recognition context
final
fieldType FormFieldType
Type of the form field (determines behavior)
final
focusedBorder InputBorder?
Optional input border customizations
final
focusedErrorBorder InputBorder?
Optional input border customizations
final
fontSize int
Font size of the input text
final
hashCode int
The hash code for this object.
no setterinherited
height int?
Height of the form field in logical pixels
final
hint String?
Placeholder or hint text shown inside the field
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType TextInputType?
Custom keyboard type (if needed)
final
label String?
Label displayed above the input field
final
maxLines int?
Max/min/error lines for multi-line fields
final
minLines int?
Max/min/error lines for multi-line fields
final
onMicTap → dynamic Function(String fieldId)?
Callback when mic icon is tapped
final
padding EdgeInsets?
Padding around the field
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffixIconButton IconButton?
Optional custom suffix icon
final
textInputAction TextInputAction?
Action button on the keyboard (e.g. next/done)
final
validator String? Function(String?)?
Optional validator function
final
width int?
Width of the form field in logical pixels
final

Methods

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