UTextField constructor
const
UTextField({
- Key? key,
- String? text,
- String? labelText,
- String? hintText,
- EdgeInsetsGeometry? contentPadding,
- double? fontSize,
- TextEditingController? controller,
- VoidCallback? onTap,
- String? validator()?,
- Widget? prefix,
- Widget? suffix,
- dynamic onSave(
- String? value
- String? initialValue,
- double? textHeight,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onFieldSubmitted, - int? maxLength,
- List<
TextInputFormatter> ? formatters, - List<
String> ? autoFillHints, - bool readOnly = false,
- TextInputType keyboardType = TextInputType.text,
- bool obscureText = false,
- int lines = 1,
- bool hasClearButton = false,
- bool required = false,
- bool isDense = false,
- TextAlign textAlign = TextAlign.start,
- Color? textColor,
- FocusNode? focusNode,
- EdgeInsetsGeometry? margin,
- bool visible = true,
- double? opacity,
- BoxFit? fit,
- AlignmentGeometry fitAlignment = Alignment.center,
- double? scale,
- double? rotate,
- Offset? translate,
- bool center = false,
- bool safeArea = false,
- int? expanded,
- int? flexible,
- bool positioned = false,
- double? left,
- double? top,
- double? right,
- double? bottom,
- double? positionedWidth,
- double? positionedHeight,
Implementation
const UTextField({
super.key,
this.text,
this.labelText,
this.hintText,
this.contentPadding,
this.fontSize,
this.controller,
this.onTap,
this.validator,
this.prefix,
this.suffix,
this.onSave,
this.initialValue,
this.textHeight,
this.onChanged,
this.onFieldSubmitted,
this.maxLength,
this.formatters,
this.autoFillHints,
this.readOnly = false,
this.keyboardType = TextInputType.text,
this.obscureText = false,
this.lines = 1,
this.hasClearButton = false,
this.required = false,
this.isDense = false,
this.textAlign = TextAlign.start,
this.textColor,
this.focusNode,
this.margin,
this.visible = true,
this.opacity,
this.fit,
this.fitAlignment = Alignment.center,
this.scale,
this.rotate,
this.translate,
this.center = false,
this.safeArea = false,
this.expanded,
this.flexible,
this.positioned = false,
this.left,
this.top,
this.right,
this.bottom,
this.positionedWidth,
this.positionedHeight,
});