TextFieldComponent class
Constructors
-
TextFieldComponent({required TextEditingController controller, required IconData icon, required String hint, Key? key, ValueChanged<String>? onChange, Widget? suffixIcon, bool isNumeric = false, String? errorText, bool readOnly = false, int maxLength = 0, bool isExpands = false, bool largeField = false, bool useOutBorderRadius = false})
-
const
Methods
-
build(BuildContext context)
→ Widget
-
Builds a TextFormField based on the component's configuration.
The input value is validated based on the component's configuration.
If the field is required and the value is null or empty, an error message is displayed.
If the field is numeric, an error message is displayed if the value is not a valid number.
If the component is numeric, the
keyboardType is set to TextInputType.number,
otherwise it is set to TextInputType.text.
When the user taps outside the field, the focus is removed from the field.
The prefixIcon is used to display an icon based on the icon argument.
The suffixIcon is used to display a suffix icon if provided.
The decoration is used to customize the appearance of the field.
The filled property is set to true, and the fillColor is set to the surface color of the theme.
The focusedBorder is set to an OutlineInputBorder with a primary color border and a width of 0.2.
The border is set to an OutlineInputBorder with no border and a circular border radius of SenseiConst.inBorderRadius.r.
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, 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