ZwapInput class
Custom component for a standard input with a predefined Zwap style
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ZwapInput
Constructors
-
ZwapInput({Key? key, TextEditingController? controller, TextInputType textInputType = TextInputType.text, int maxLines = 1, bool disabled = false, EdgeInsets internalPadding = const EdgeInsets.all(15), dynamic onChanged(String newValue)?, String? label, String? placeholder, IconData? prefixIcon, IconData? suffixIcon, dynamic keyCallBackFunction(String value)?, String? helperText, bool helperTextIsError = true, List<
String> autofillHints = const [], FocusNode? focusNode, String? prefixText, bool showSuccess = false, int? minLines, bool readOnly = false, dynamic onTap()?, String? fixedInitialText, TextStyle? fixedInitialTextStyle, String? initialValue, List<TextInputFormatter> ? inputFormatters, TextCapitalization? textCapitalization, Widget? suffixWidget, Widget? prefixWidget, double borderRadius = 8, void onEditingComplete()?, bool obscure = false, bool autoObscureIfPassword = true, int minLenght = 0, bool showMinLenghtIndicator = true, bool showClearAll = false, String translateKey(String key)?, TextStyle? textStyle, TextStyle? disabledTextStyle, Color? cursorColor, String? dynamicLabel, TextStyle? dynamicLabelTextStyle, String? subtitle, bool useOutlinedDecoration = true, Widget? helperWidget, bool showCheckboxOnSuccessState = true, TextStyle? placeholderStyle, bool forceNoBorders = false, Color? hoveredBorderColor, Color? enabledBorderColor, Color? focussedBorderColor, Color? disabledBorderColor, Color? backgroundColor, Color? dynamicLabelColor, double borderWidth = 1, TextStyle? labelTextStyle, ScrollController? scrollController, EdgeInsets? scrollPadding, TextAlign? textAlign, TextAlignVertical? textAlignVertical}) -
ZwapInput.collapsed({Key? key, TextEditingController? controller, TextInputType textInputType = TextInputType.text, bool readOnly = false, dynamic onTap()?, int maxLines = 1, int? minLines, bool disabled = false, EdgeInsets internalPadding = const EdgeInsets.all(15), dynamic onChanged(String newValue)?, String? label, required String? placeholder, IconData? prefixIcon, IconData? suffixIcon, dynamic keyCallBackFunction(String value)?, String? helperText, bool helperTextIsError = true, List<
String> autofillHints = const [], FocusNode? focusNode, String? prefixText, String? fixedInitialText, TextStyle? fixedInitialTextStyle, String? initialValue, List<TextInputFormatter> ? inputFormatters, TextCapitalization? textCapitalization, Widget? suffixWidget, Widget? prefixWidget, double borderRadius = 8, void onEditingComplete()?, bool obscure = false, bool autoObscureIfPassword = true, int minLenght = 0, bool showMinLenghtIndicator = true, bool showClearAll = false, String translateKey(String key)?, TextStyle? textStyle, TextStyle? disabledTextStyle, Color? cursorColor, String? dynamicLabel, TextStyle? dynamicLabelTextStyle, String? subtitle, bool useOutlinedDecoration = true, Widget? helperWidget, bool showCheckboxOnSuccessState = true, TextStyle? placeholderStyle, bool forceNoBorders = false, Color? hoveredBorderColor, Color? enabledBorderColor, Color? focussedBorderColor, Color? disabledBorderColor, Color? backgroundColor, Color? dynamicLabelColor, double borderWidth = 1, TextStyle? labelTextStyle, ScrollController? scrollController, EdgeInsets? scrollPadding, TextAlign? textAlign, TextAlignVertical? textAlignVertical})
Properties
-
autofillHints
→ List<
String> -
Autofill hints inside the input text
final
- autoObscureIfPassword → bool
-
If
textInputType == TextInputType.visiblePassword
text will be obscure automaticallyfinal - backgroundColor → Color?
-
final
- borderRadius → double
-
final
- borderWidth → double
-
final
- controller → TextEditingController?
-
Text controller for handling the value from external of this component
final
- cursorColor → Color?
-
The input cursor color
final
- disabled → bool
-
If
true
input will be disabledfinal - disabledBorderColor → Color?
-
final
- disabledTextStyle → TextStyle?
-
The value text style when disabled is true
final
- dynamicLabel → String?
-
If provided a "floating" label will be showed:
final
- dynamicLabelColor → Color?
-
final
- dynamicLabelTextStyle → TextStyle?
-
Color will be overwritten in base of the current state
(focussed or not)
final
- enabledBorderColor → Color?
-
final
- fixedInitialText → String?
-
final
- fixedInitialTextStyle → TextStyle?
-
Ignored if fixedInitialText is null
final
- focusNode → FocusNode?
-
final
- focussedBorderColor → Color?
-
final
- forceNoBorders → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- helperText → String?
-
The text showed under the input
final
- helperTextIsError → bool
-
If
true
helperText will be shown as error, else as regular textfinal - helperWidget → Widget?
-
If provided showed under the input
final
- hoveredBorderColor → Color?
-
final
- initialValue → String?
-
If you don't wont or can't provide a controller but need to provide some initial values use this field.
final
-
inputFormatters
→ List<
TextInputFormatter> ? -
final
- internalPadding → EdgeInsets
-
Custom internal padding for this input
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyCallBackFunction → (dynamic Function(String value)?)
-
The on key callBack function
final
- label → String?
-
The input name as a label text
final
- labelTextStyle → TextStyle?
-
final
- maxLines → int
-
The max lines to rendering in the input text multi lines
final
- minLenght → int
-
If <= 0 nothing change
final
- minLines → int?
-
final
- obscure → bool
-
Is true text will be obscured
final
- onChanged → (dynamic Function(String newValue)?)
-
It handles the changes inside this input text field
final
- onEditingComplete → (void Function()?)
-
final
- onTap → (dynamic Function()?)
-
final
- placeholder → String?
-
The placeholder for this input
final
- placeholderStyle → TextStyle?
-
The placeholder text style
final
- prefixIcon → IconData?
-
Optionally prefix icon
final
- prefixText → String?
-
final
- prefixWidget → Widget?
-
final
- readOnly → bool
-
If true input will de disabled but without the disabled decorations
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
final
- scrollPadding → EdgeInsets?
-
final
- showCheckboxOnSuccessState → bool
-
If true and showSuccess is true a checkbox icon will
be used as suffix icon
final
- showClearAll → bool
-
If true a clear all button will be showd under the input on the right
final
- showMinLenghtIndicator → bool
-
Works only if minLenght > 0. Tipically used with collapsed input
final
- showSuccess → bool
-
final
- subtitle → String?
-
Showed under the input, usually used for something
like "Shift + Enter for new line"
final
- suffixIcon → IconData?
-
Optionally suffix icon
final
- suffixWidget → Widget?
-
final
- textAlign → TextAlign?
-
final
- textAlignVertical → TextAlignVertical?
-
final
- textCapitalization → TextCapitalization?
-
final
- textInputType → TextInputType
-
The input type for this custom component
final
- textStyle → TextStyle?
-
The value text style
final
- translateKey → (String Function(String key)?)
-
This will be used to translate 'zwap_input_characters' and 'zwap_input_clear_all' keys
final
- useOutlinedDecoration → bool
-
If true the input will have OutlineInputBorder as border,
UnderlineInputBorder otherwise.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ZwapInputState -
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