ModernTextField class

Inheritance

Constructors

ModernTextField({Key? key, TextEditingController? controller, String? initialValue, FocusNode? focusNode, TextInputType? keyboardType, TextInputAction? textInputAction, TextStyle? style, StrutStyle? strutStyle, TextDirection? textDirection, TextAlignVertical? textAlignVertical, FontWeight? labelWeight, FontWeight? textWeight, ModernTextFieldTheme? theme, ToolbarOptions? toolbarOptions, bool showCursor = true, int? minLines, int? maxLength, ValueChanged<String>? onChanged, GestureTapCallback? onTap, VoidCallback? onEditingComplete, ValueChanged<String>? onFieldSubmitted, FormFieldSetter<String>? onSaved, FormFieldValidator<String>? validator, List<TextInputFormatter>? inputFormatters, Radius? cursorRadius, Color? cursorColor, Brightness? keyboardAppearance, InputCounterWidgetBuilder? buildCounter, String? labelText, String? errorText, String? hintText, Widget? prefixIcon, Widget? suffixIcon, bool autofocus = false, bool readOnly = false, bool obscureText = false, bool autocorrect = true, bool enableSuggestions = true, MaxLengthEnforcement maxLengthEnforcement = MaxLengthEnforcement.enforced, AutovalidateMode autovalidateMode = AutovalidateMode.disabled, int maxLines = 1, bool expands = false, bool enabled = true, GestureTapCallback? onSuffixTap, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), TextCapitalization textCapitalization = TextCapitalization.none})

Properties

autocorrect bool
final
autofocus bool
final
autovalidateMode AutovalidateMode
final
buildCounter InputCounterWidgetBuilder?
final
controller TextEditingController?
final
cursorColor Color?
final
cursorRadius Radius?
final
cursorWidth double
final
enabled bool
final
enableInteractiveSelection bool
final
enableSuggestions bool
final
errorText String?
final
expands bool
final
focusNode FocusNode?
final
hashCode int
The hash code for this object.
no setterinherited
hintText String?
final
initialValue String?
final
inputFormatters List<TextInputFormatter>?
final
key Key?
Controls how one widget replaces another widget in the tree.
final
keyboardAppearance Brightness?
final
keyboardType TextInputType?
final
labelText String?
final
labelWeight FontWeight?
final
maxLength int?
final
maxLengthEnforcement MaxLengthEnforcement
final
maxLines int
final
minLines int?
final
obscureText bool
final
onChanged ValueChanged<String>?
final
onEditingComplete VoidCallback?
final
onFieldSubmitted ValueChanged<String>?
final
onSaved FormFieldSetter<String>?
final
onSuffixTap GestureTapCallback?
final
onTap GestureTapCallback?
final
prefixIcon Widget?
final
readOnly bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollPadding EdgeInsets
final
showCursor bool
final
strutStyle StrutStyle?
final
style TextStyle?
final
suffixIcon Widget?
final
textAlign TextAlign
final
textAlignVertical TextAlignVertical?
final
textCapitalization TextCapitalization
final
textDirection TextDirection?
final
textInputAction TextInputAction?
final
textWeight FontWeight?
final
theme ModernTextFieldTheme?
final
toolbarOptions ToolbarOptions?
final
validator FormFieldValidator<String>?
final

Methods

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