InputField class

Inheritance

Constructors

InputField({Key? key, TextEditingController? controller, ValueChanged<String>? onChanged, String? hintText, String? innerLabelText, Color? borderColor, double? elevation, IconData? prefixIcon, IconData? suffixIcon, String? labelText, double? labelFieldSpace, bool? isMultiline, TextInputType? inputType, VoidCallback? onTap, void onTapOutside(PointerDownEvent pointerDownEvent)?, bool? readOnly, bool? isObscure, int? maxLines, int? minLines, EdgeInsets? contentPadding, InputDecoration? inputDecoration, Color? fillColor, TextStyle? allTextStyle, TextStyle? textStyle, TextStyle? hintStyle, TextStyle? innerLabelStyle, TextStyle? labelStyle, bool? labelIsBold, InputDecorationBuilder? inputDecorationBuilder, BorderRadius? borderRadius, FocusNode? focusNode, TextDirection? textDirection, FormFieldValidator<String>? validator, List<TextInputFormatter>? inputFormatters})
const
InputField.fromFieldInfo(FieldInfo info, {double? labelFieldSpace, Color? borderColor, double? elevation, EdgeInsets? contentPadding, InputDecoration? inputDecoration, InputDecorationBuilder? inputDecorationBuilder, Color? fillColor, TextStyle? textStyle, TextStyle? allTextStyle, TextStyle? labelStyle, TextStyle? hintStyle, TextStyle? innerLabelStyle, bool? labelIsBold, BorderRadius? borderRadius, FocusNode? focusNode, TextDirection? textDirection})
This constructor takes a field info object for the main properties (used mostly for forms)
factory

Properties

allTextStyle TextStyle?
customizes the all the styles of the text field with the label being bold if not canceled by labelIsBold
final
borderColor Color?
the color of the border of the field
final
borderRadius BorderRadius?
specifies borderRadius of the text field including the material widget (which gives shadow effect if elevation is not null)
final
contentPadding EdgeInsets?
specifies content padding
final
controller TextEditingController?
the controller of the field
final
elevation double?
the elevation of the field
final
fillColor Color?
customize the fill color of the field
final
focusNode FocusNode?
specifies the focus node of the text field
final
hashCode int
The hash code for this object.
no setterinherited
hintStyle TextStyle?
customizes the style of the hint
final
hintText String?
the hint text shown in the field in grey
final
innerLabelStyle TextStyle?
customizes the style of the inner label
final
innerLabelText String?
the label that appears to the right of the suffix icon (suffix icon can be null)
final
inputDecoration InputDecoration?
optional custom decoration
final
inputDecorationBuilder InputDecorationBuilder?
optional custom decoration builder (to be used in order to copyWith the decoration)
final
inputFormatters List<TextInputFormatter>?
specifies the formatters of the form field
final
inputType TextInputType?
specifies the keyboard type of the field
final
isMultiline bool?
specifies if the field is multiline, which makes the field expand up to 5 lines and makes the keyboard of type multiline
final
isObscure bool?
specifies if the field input is obscured
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelFieldSpace double?
the space between the label and the field
final
labelIsBold bool?
specifies if the label should be bold
final
labelStyle TextStyle?
customizes the style of the label
final
labelText String?
the label text show above the field
final
maxLines int?
specifies max lines for multi-line fields
final
minLines int?
specifies min lines for multi-line fields
final
onChanged ValueChanged<String>?
the onChanged of the field
final
onTap VoidCallback?
specifies the action to be taken when the field is tapped
final
onTapOutside → (void Function(PointerDownEvent pointerDownEvent)?)
specifies the action to be taken when the outside of the field is tapped
final
prefixIcon IconData?
the prefix icon
final
readOnly bool?
specifies if the field is read only
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffixIcon IconData?
the suffix icon
final
textDirection TextDirection?
specifies the text direction of the hint and text
final
textStyle TextStyle?
customizes the style of the field text
final
validator FormFieldValidator<String>?
specifies the validator of the form field
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
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