NyTextField class

Nylo's Text Field Widget

Inheritance
Available extensions

Constructors

NyTextField({Key? key, required TextEditingController controller, String? labelText, bool obscureText = false, bool autoFocus = false, TextInputType keyboardType = TextInputType.text, TextAlign? textAlign, int? maxLines = 1, bool? validateOnFocusChange = true, dynamic handleValidationError(String handleError)?, int? minLines, bool enableSuggestions = true, String? hintText, TextStyle? hintStyle, FocusNode? focusNode, String? validationRules, String? dummyData, dynamic onChanged(String value)?, TextStyle? style, StrutStyle? strutStyle, TextInputAction? textInputAction, bool readOnly = false, bool? showCursor, int? maxLength, bool? enabled, DragStartBehavior dragStartBehavior = DragStartBehavior.start, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, String? validationErrorMessage, MouseCursor? mouseCursor, TextCapitalization textCapitalization = TextCapitalization.none, MaxLengthEnforcement? maxLengthEnforcement, double cursorWidth = 2.0, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter>? inputFormatters, bool expands = false, TextAlignVertical? textAlignVertical, TextDirection? textDirection, String obscuringCharacter = '•', bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, InputDecoration? decoration, VoidCallback? onEditingComplete, Brightness? keyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), TextSelectionControls? selectionControls, ValueChanged<String>? onSubmitted, ScrollController? scrollController, ScrollPhysics? scrollPhysics, Iterable<String>? autofillHints = const <String>[], Clip clipBehavior = Clip.hardEdge, bool? passwordVisible, bool? passwordViewable, Widget? prefixIcon, Color? backgroundColor, BorderRadius? borderRadius, InputBorder? border, InputBorder? focusedBorder, InputBorder? enabledBorder, EdgeInsetsGeometry? contentPadding, TextStyle? labelStyle, bool customValidationRule(dynamic value)?, Widget? header, Widget? footer, bool? clearable, Widget? clearIcon, String? mask, String? maskMatch, bool? maskedReturnValue, DecoratorTextField? decorator, String? type})
Default Text Field
NyTextField.compact({Key? key, bool? passwordVisible, String? labelText, required TextEditingController controller, bool obscureText = false, bool autoFocus = false, TextInputType keyboardType = TextInputType.text, TextAlign? textAlign, bool? validateOnFocusChange = false, int? maxLines = 1, dynamic handleValidationError(String handleError)?, int? minLines, bool enableSuggestions = true, String? hintText, TextStyle? hintStyle, FocusNode? focusNode, String? validationRules, String? dummyData, dynamic onChanged(String value)?, TextStyle? style, StrutStyle? strutStyle, TextInputAction? textInputAction, bool readOnly = false, bool? showCursor, int? maxLength, bool? enabled, DragStartBehavior dragStartBehavior = DragStartBehavior.start, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, String? validationErrorMessage, MouseCursor? mouseCursor, TextCapitalization textCapitalization = TextCapitalization.none, MaxLengthEnforcement? maxLengthEnforcement, double cursorWidth = 2.0, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter>? inputFormatters, bool expands = false, TextAlignVertical? textAlignVertical, TextDirection? textDirection, String obscuringCharacter = '•', bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, InputDecoration? decoration, VoidCallback? onEditingComplete, Brightness? keyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), TextSelectionControls? selectionControls, ValueChanged<String>? onSubmitted, ScrollController? scrollController, ScrollPhysics? scrollPhysics, Iterable<String>? autofillHints = const <String>[], Clip clipBehavior = Clip.hardEdge, Widget? prefixIcon, Color? backgroundColor, BorderRadius? borderRadius, InputBorder? border, InputBorder? focusedBorder, InputBorder? enabledBorder, EdgeInsetsGeometry? contentPadding, TextStyle? labelStyle, bool customValidationRule(dynamic value)?, Widget? header, Widget? footer, bool? clearable, Widget? clearIcon, String? mask, String? maskMatch, bool? maskedReturnValue, DecoratorTextField? decorator, String? type = 'compact'})
Compact Text Field
NyTextField.emailAddress({Key? key, String? labelText = "Email Address", required TextEditingController controller, bool obscureText = false, bool autoFocus = true, TextInputType keyboardType = TextInputType.emailAddress, TextAlign? textAlign, bool? validateOnFocusChange = false, int? maxLines = 1, dynamic handleValidationError(String handleError)?, int? minLines, bool enableSuggestions = true, String? hintText, TextStyle? hintStyle, FocusNode? focusNode, String? validationRules, String? dummyData, dynamic onChanged(String value)?, TextStyle? style, StrutStyle? strutStyle, TextInputAction? textInputAction, bool readOnly = false, bool? showCursor, int? maxLength, bool? enabled, DragStartBehavior dragStartBehavior = DragStartBehavior.start, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, String? validationErrorMessage, MouseCursor? mouseCursor, TextCapitalization textCapitalization = TextCapitalization.none, MaxLengthEnforcement? maxLengthEnforcement, double cursorWidth = 2.0, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter>? inputFormatters, bool expands = false, TextAlignVertical? textAlignVertical, TextDirection? textDirection, String obscuringCharacter = '•', bool autocorrect = true, SmartDashesType? smartDashesType, bool? passwordViewable, SmartQuotesType? smartQuotesType, InputDecoration? decoration, VoidCallback? onEditingComplete, Brightness? keyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), TextSelectionControls? selectionControls, ValueChanged<String>? onSubmitted, ScrollController? scrollController, ScrollPhysics? scrollPhysics, Iterable<String>? autofillHints = const <String>[], Clip clipBehavior = Clip.hardEdge, Widget? prefixIcon, Color? backgroundColor, BorderRadius? borderRadius, InputBorder? border, InputBorder? focusedBorder, InputBorder? enabledBorder, EdgeInsetsGeometry? contentPadding, TextStyle? labelStyle, bool? passwordVisible, bool customValidationRule(dynamic value)?, Widget? header, Widget? footer, bool? clearable, Widget? clearIcon, String? mask, String? maskMatch, bool? maskedReturnValue, DecoratorTextField? decorator, String? type = 'email-address'})
Email Address Text Field
NyTextField.password({Key? key, bool? passwordVisible, String? labelText = "Password", required TextEditingController controller, bool obscureText = true, bool autoFocus = false, TextInputType keyboardType = TextInputType.text, TextAlign? textAlign, int? maxLines = 1, bool? validateOnFocusChange = false, dynamic handleValidationError(String handleError)?, int? minLines, bool enableSuggestions = true, String? hintText, TextStyle? hintStyle, FocusNode? focusNode, String? validationRules, String? dummyData, dynamic onChanged(String value)?, TextStyle? style, StrutStyle? strutStyle, TextInputAction? textInputAction, bool readOnly = false, bool? showCursor, int? maxLength, bool? enabled, DragStartBehavior dragStartBehavior = DragStartBehavior.start, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, String? validationErrorMessage, MouseCursor? mouseCursor, TextCapitalization textCapitalization = TextCapitalization.none, MaxLengthEnforcement? maxLengthEnforcement, double cursorWidth = 2.0, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter>? inputFormatters, bool expands = false, TextAlignVertical? textAlignVertical, TextDirection? textDirection, String obscuringCharacter = '•', bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, InputDecoration? decoration, VoidCallback? onEditingComplete, Brightness? keyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), TextSelectionControls? selectionControls, ValueChanged<String>? onSubmitted, ScrollController? scrollController, ScrollPhysics? scrollPhysics, bool? passwordViewable, Iterable<String>? autofillHints = const <String>[], Clip clipBehavior = Clip.hardEdge, Widget? prefixIcon, Color? backgroundColor, BorderRadius? borderRadius, InputBorder? border, InputBorder? focusedBorder, InputBorder? enabledBorder, EdgeInsetsGeometry? contentPadding, TextStyle? labelStyle, bool customValidationRule(dynamic value)?, Widget? header, Widget? footer, bool? clearable, Widget? clearIcon, String? mask, String? maskMatch, bool? maskedReturnValue, DecoratorTextField? decorator, String? type = 'password'})
Password Text Field

Properties

autocorrect bool
final
autofillHints Iterable<String>?
final
autoFocus bool
final
backgroundColor Color?
final
border InputBorder?
final
borderRadius BorderRadius?
final
clearable bool?
final
clearIcon Widget?
final
clipBehavior Clip
final
contentPadding EdgeInsetsGeometry?
final
controller TextEditingController
final
cursorColor Color?
final
cursorHeight double?
final
cursorRadius Radius?
final
cursorWidth double
final
customValidationRule bool Function(dynamic value)?
final
decoration InputDecoration?
final
decorator DecoratorTextField?
final
dragStartBehavior DragStartBehavior
final
dummyData String?
final
enabled bool?
final
enabledBorder InputBorder?
final
enableSuggestions bool
final
expands bool
final
focusedBorder InputBorder?
final
focusNode FocusNode?
final
final
handleValidationError → dynamic Function(String handleError)?
final
hashCode int
The hash code for this object.
no setterinherited
final
hintStyle TextStyle?
final
hintText String?
final
inputFormatters List<TextInputFormatter>?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAppearance Brightness?
final
keyboardType TextInputType
final
labelStyle TextStyle?
final
labelText String?
final
mask String?
final
maskedReturnValue bool?
final
maskMatch String?
final
maxLength int?
final
maxLengthEnforcement MaxLengthEnforcement?
final
maxLines int?
final
minLines int?
final
mouseCursor MouseCursor?
final
obscureText bool
final
obscuringCharacter String
final
onAppPrivateCommand AppPrivateCommandCallback?
final
onChanged → dynamic Function(String value)?
final
onEditingComplete VoidCallback?
final
onSubmitted ValueChanged<String>?
final
onTap GestureTapCallback?
final
onTapOutside TapRegionCallback?
final
passwordViewable bool?
final
passwordVisible bool?
final
prefixIcon Widget?
final
readOnly bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
final
scrollPadding EdgeInsets
final
scrollPhysics ScrollPhysics?
final
selectionControls TextSelectionControls?
final
showCursor bool?
final
smartDashesType SmartDashesType?
final
smartQuotesType SmartQuotesType?
final
strutStyle StrutStyle?
final
style TextStyle?
final
textAlign TextAlign?
final
textAlignVertical TextAlignVertical?
final
textCapitalization TextCapitalization
final
textDirection TextDirection?
final
textInputAction TextInputAction?
final
type String?
final
validateOnFocusChange bool?
final
validationErrorMessage String?
final
validationRules String?
final

Methods

copyWith({String? labelText, TextStyle? labelStyle, TextEditingController? controller, bool? obscureText, int? maxLines, int? minLines, TextInputType? keyboardType, bool? autoFocus, TextAlign? textAlign, bool? enableSuggestions, FocusNode? focusNode, String? hintText, TextStyle? hintStyle, String? validationRules, String? dummyData, dynamic onChanged(String value)?, TextInputAction? textInputAction, TextStyle? style, StrutStyle? strutStyle, TextAlignVertical? textAlignVertical, TextDirection? textDirection, String? obscuringCharacter, bool? autocorrect, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool? expands, bool? readOnly, bool? showCursor, int? maxLength, bool? passwordViewable, bool? validateOnFocusChange, MouseCursor? mouseCursor, String? validationErrorMessage, TextCapitalization? textCapitalization, MaxLengthEnforcement? maxLengthEnforcement, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter>? inputFormatters, bool? enabled, double? cursorWidth, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, Brightness? keyboardAppearance, EdgeInsets? scrollPadding, TextSelectionControls? selectionControls, DragStartBehavior? dragStartBehavior, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, InputDecoration? decoration, VoidCallback? onEditingComplete, ValueChanged<String>? onSubmitted, ScrollController? scrollController, ScrollPhysics? scrollPhysics, Iterable<String>? autofillHints, Clip? clipBehavior, dynamic handleValidationError(String handleError)?, bool? passwordVisible, String? type, Widget? prefixIcon, Color? backgroundColor, BorderRadius? borderRadius, InputBorder? border, InputBorder? focusedBorder, InputBorder? enabledBorder, EdgeInsetsGeometry? contentPadding, bool customValidationRule(dynamic value)?, String? title, TextStyle? titleStyle, bool? clearable, Widget? clearIcon, String? mask, String? maskMatch, bool? maskedReturnValue, DecoratorTextField? decorator}) NyTextField
Copy with method
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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
merge(InputDecoration decoration) NyTextField
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