FitTextInput class

Wrapper for TextFormField. Uses bodyMedium to set the style of the value.

Inheritance

Constructors

FitTextInput({Key? key, TextEditingController? controller, bool autofocus = false, TextInputAction? inputAction, int maxLength = _defaultMaxLength, required String label, bool markAsRequired = false, String hint = "", bool hideValue = false, Widget? suffix, FocusNode? focusNode, AutovalidateMode validationMode = AutovalidateMode.disabled, TextInputType keyboardType = TextInputType.text, TextCapitalization capitalization = TextCapitalization.none, List<TextInputFormatter>? formatters, String? validation(String?)?, dynamic onFieldSubmitted(String)?, dynamic onChange(String)?, EdgeInsets? margin, EdgeInsets? padding, int? maxLines = 1, int? minLines, bool expand = false, double? width, double? height, bool? readonly})
Creates a new FitTextInput.
const
FitTextInput.multiline({Key? key, TextEditingController? controller, bool autofocus = false, int maxLength = 255, TextInputAction? inputAction, required String label, bool markAsRequired = false, String hint = "", bool hideValue = false, Widget? suffix, FocusNode? focusNode, AutovalidateMode validationMode = AutovalidateMode.disabled, TextInputType keyboardType = TextInputType.multiline, TextCapitalization capitalization = TextCapitalization.sentences, List<TextInputFormatter>? formatters, String? validation(String?)?, dynamic onFieldSubmitted(String)?, dynamic onChange(String)?, EdgeInsets? margin, EdgeInsets? padding, int? maxLines, int? minLines, bool expand = true, double? width, double? height = 200, bool? readonly})
Creates a new FitTextInput, with presets to use allow multiple lines.
const

Properties

autofocus bool
true if the field should be focused when building. false by default.
final
capitalization TextCapitalization
Capitalization of the field value.
final
controller TextEditingController?
Editing controller.
final
expand bool
Set to true if you want the field to take the available height.
final
focusNode FocusNode?
Focus node.
final
formatters List<TextInputFormatter>?
Formatters.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Height of the field, in pixels.
final
hideValue bool
Set to true if the value of the field should be hidden. Ex: for a password.
final
hint String
Field hint.
final
inputAction TextInputAction?
Input action when the field is submitted.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType TextInputType
Keyboard type. Note: on iOS, the number keyboard doesn't have a submit button.
final
label String
Field label.
final
margin EdgeInsets?
Margin of the field.
final
markAsRequired bool
Set to true to mark a field as required. A required field has an * next to it's label.
final
maxLength int
Maximum allowed length of value. 255 by default.
final
maxLines int?
Maximum amount of lines allowed.
final
minLines int?
Minimum lines of text.
final
onChange → dynamic Function(String)?
Execute when the value of the field is changing.
final
onFieldSubmitted → dynamic Function(String)?
Execute when the field has been submited.
final
padding EdgeInsets?
Padding of the field.
final
readonly bool?
Set to true if the field's value should be read only.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffix Widget?
Suffix of the field, aligned to the right of the value.
final
validation String? Function(String?)?
Execute to validate the field's value.
final
validationMode AutovalidateMode
Validation mode.
final
width double?
Width of the field, in pixels.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
copyWith({String? label, TextEditingController? controller, bool? autofocus, TextInputAction? inputAction, bool? markAsRequired, String? hint, bool? hideValue, Widget? suffix, FocusNode? focusNode, AutovalidateMode? validationMode, TextInputType? keyboardType, TextCapitalization? capitalization, List<TextInputFormatter>? formatters, String? validation(String?)?, dynamic onFieldSubmitted(String)?, dynamic onChange(String)?, EdgeInsets? margin, EdgeInsets? padding, int? maxLines, int? minLines, bool? expand, double? width, double? height, bool? readonly}) FitTextInput
Copies an instance and override properties.
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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