CustomTextField constructor
const
CustomTextField({
- Key? key,
- double? height,
- double? width,
- EdgeInsets? margin,
- EdgeInsets? padding,
- bool disabled = false,
- bool obscureText = false,
- bool autocorrect = false,
- bool dense = false,
- bool filled = false,
- bool alignLabelWithHint = true,
- bool singleLine = false,
- bool noSpace = false,
- Color? backgroundColor,
- Color? borderColor,
- BorderRadius? borderRadius,
- BorderSide? enabledBorderSide,
- BorderSide? focusedBorderSide,
- BorderSide? disabledBorderSide,
- int? flex,
- int? minLines = 1,
- int? maxLines = 1,
- int? maxLength,
- String? initialValue,
- String? hintText,
- String? labelText,
- TextStyle? style,
- TextStyle? hintStyle,
- TextStyle? labelStyle,
- TextStyle? floatingLabelStyle,
- TextAlign textAlign = TextAlign.start,
- Widget? prefix,
- Widget? prefixIcon,
- Widget? suffix,
- Widget? suffixIcon,
- Widget? counter,
- TextEditingController? controller,
- TextInputType? keyboardType,
- TextCapitalization textCapitalization = TextCapitalization.sentences,
- InputFormat? inputFormat,
- List<
TextInputFormatter> inputFormatters = const [], - FocusNode? focusNode,
- Function? onEditingComplete,
- Function? onChanged,
- Function? validator,
Implementation
const CustomTextField({
super.key,
this.height,
this.width,
this.margin,
this.padding,
this.disabled = false,
this.obscureText = false,
this.autocorrect = false,
this.dense = false,
this.filled = false,
this.alignLabelWithHint = true,
this.singleLine = false,
this.noSpace = false,
this.backgroundColor,
this.borderColor,
this.borderRadius,
this.enabledBorderSide,
this.focusedBorderSide,
this.disabledBorderSide,
this.flex,
this.minLines = 1,
this.maxLines = 1,
this.maxLength,
this.initialValue,
this.hintText,
this.labelText,
this.style,
this.hintStyle,
this.labelStyle,
this.floatingLabelStyle,
this.textAlign = TextAlign.start,
this.prefix,
this.prefixIcon,
this.suffix,
this.suffixIcon,
this.counter,
this.controller,
this.keyboardType,
this.textCapitalization = TextCapitalization.sentences,
this.inputFormat,
this.inputFormatters = const [],
this.focusNode,
this.onEditingComplete,
this.onChanged,
this.validator
}) : assert(
(controller == null) || (initialValue == null),
"Solo se puede recibir uno de los dos atributos: 'controller' o 'initialValue', pero no ambos."
),
assert(
(width == null) || (flex == null),
"Solo se puede recibir uno de los dos atributos: 'width' o 'flex', pero no ambos."
);