EditText constructor
const
EditText({
- Key? key,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- double? height,
- double? width,
- int maxLines = 1,
- int? maxLength,
- TextStyle? style,
- String? hint,
- TextStyle? hintStyle,
- bool enabled = true,
- bool obscureText = false,
- bool showCountHint = true,
- Color? cursorColor,
- TextEditingController? controller,
- String? name,
- FocusNode? focusNode,
- ValueChanged<
String> ? onChanged, - TextInputType? inputType,
- TextDirection? textDirection,
- InputDecoration? decoration,
- bool autoFocus = false,
- TextAlign textAlign = TextAlign.start,
- VoidCallback? complete,
- TextInputAction? textInputAction,
- ValueChanged<
String> ? onSubmitted, - num? scrollPadding,
Implementation
const EditText({
Key? key,
this.margin,
this.padding,
this.height,
this.width,
this.maxLines = 1,
this.maxLength,
this.style,
this.hint,
this.hintStyle,
this.enabled = true,
this.obscureText = false,
this.showCountHint = true,
this.cursorColor,
this.controller,
this.name,
this.focusNode,
this.onChanged,
TextInputType? inputType,
this.textDirection,
this.decoration,
this.autoFocus = false,
this.textAlign = TextAlign.start,
this.complete,
this.textInputAction,
this.onSubmitted,
this.scrollPadding,
}) : keyboardType = inputType ??
(maxLines == 1 ? TextInputType.text : TextInputType.multiline),
super(key: key);