NyTextField constructor

NyTextField({
  1. Key? key,
  2. required TextEditingController controller,
  3. String? labelText,
  4. bool obscureText = false,
  5. bool autoFocus = false,
  6. TextInputType keyboardType = TextInputType.text,
  7. TextAlign? textAlign,
  8. int? maxLines = 1,
  9. dynamic handleValidationError(
    1. String handleError
    )?,
  10. int? minLines,
  11. bool enableSuggestions = true,
  12. String? hintText,
  13. TextStyle? hintStyle,
  14. FocusNode? focusNode,
  15. String? validationRules,
  16. String? dummyData,
  17. dynamic onChanged(
    1. String value
    )?,
  18. TextStyle? style,
  19. StrutStyle? strutStyle,
  20. TextInputAction? textInputAction,
  21. bool readOnly = false,
  22. bool? showCursor,
  23. int? maxLength,
  24. bool? enabled,
  25. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  26. double? cursorHeight,
  27. Radius? cursorRadius,
  28. Color? cursorColor,
  29. GestureTapCallback? onTap,
  30. TapRegionCallback? onTapOutside,
  31. String? validationErrorMessage,
  32. MouseCursor? mouseCursor,
  33. TextCapitalization textCapitalization = TextCapitalization.none,
  34. MaxLengthEnforcement? maxLengthEnforcement,
  35. double cursorWidth = 2.0,
  36. AppPrivateCommandCallback? onAppPrivateCommand,
  37. List<TextInputFormatter>? inputFormatters,
  38. bool expands = false,
  39. TextAlignVertical? textAlignVertical,
  40. TextDirection? textDirection,
  41. String obscuringCharacter = '•',
  42. bool autocorrect = true,
  43. SmartDashesType? smartDashesType,
  44. SmartQuotesType? smartQuotesType,
  45. InputDecoration? decoration,
  46. VoidCallback? onEditingComplete,
  47. Brightness? keyboardAppearance,
  48. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  49. TextSelectionControls? selectionControls,
  50. ValueChanged<String>? onSubmitted,
  51. ScrollController? scrollController,
  52. ScrollPhysics? scrollPhysics,
  53. Iterable<String>? autofillHints = const <String>[],
  54. Clip clipBehavior = Clip.hardEdge,
  55. bool? passwordVisible,
  56. Widget? prefixIcon,
  57. Color? backgroundColor,
  58. BorderRadius? borderRadius,
  59. InputBorder? border,
  60. InputBorder? focusedBorder,
  61. InputBorder? enabledBorder,
  62. EdgeInsetsGeometry? contentPadding,
  63. TextStyle? labelStyle,
})

Default Text Field

Implementation

NyTextField({
  Key? key,
  required this.controller,
  this.labelText,
  this.obscureText = false,
  this.autoFocus = false,
  this.keyboardType = TextInputType.text,
  this.textAlign,
  this.maxLines = 1,
  this.handleValidationError,
  this.minLines,
  this.enableSuggestions = true,
  this.hintText,
  this.hintStyle,
  this.focusNode,
  this.validationRules,
  this.dummyData,
  this.onChanged,
  this.style,
  this.strutStyle,
  this.textInputAction,
  this.readOnly = false,
  this.showCursor,
  this.maxLength,
  this.enabled,
  this.dragStartBehavior = DragStartBehavior.start,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.onTap,
  this.onTapOutside,
  this.validationErrorMessage,
  this.mouseCursor,
  this.textCapitalization = TextCapitalization.none,
  this.maxLengthEnforcement,
  this.cursorWidth = 2.0,
  this.onAppPrivateCommand,
  this.inputFormatters,
  this.expands = false,
  this.textAlignVertical,
  this.textDirection,
  this.obscuringCharacter = '•',
  this.autocorrect = true,
  this.smartDashesType,
  this.smartQuotesType,
  this.decoration,
  this.onEditingComplete,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(20.0),
  this.selectionControls,
  this.onSubmitted,
  this.scrollController,
  this.scrollPhysics,
  this.autofillHints = const <String>[],
  this.clipBehavior = Clip.hardEdge,
  this.passwordVisible,
  this.prefixIcon,
  this.backgroundColor,
  this.borderRadius,
  this.border,
  this.focusedBorder,
  this.enabledBorder,
  this.contentPadding,
  this.labelStyle,
})  : type = null,
      super(key: key);