AppTextField constructor
const
AppTextField({
- Key? key,
- TextEditingController? controller,
- void onChange()?,
- TextInputType keyboardType = TextInputType.text,
- String? validator()?,
- double borderRadius = 8.0,
- Color textColor = Colors.black,
- Color backgroundColor = Colors.transparent,
- Widget? suffix,
- Widget? prefix,
- int maxLines = 1,
- required String hintText,
- TextStyle hintTextStyle = const TextStyle(color: Colors.grey),
- String? labelText,
- TextStyle? labelStyle,
- TextStyle textStyle = const TextStyle(),
- bool obscureText = false,
- bool isEnabled = true,
- List<
TextInputFormatter> inputFormatters = const [],
Implementation
const AppTextField({
Key? key,
this.controller,
this.onChange,
this.keyboardType = TextInputType.text,
this.validator,
this.borderRadius = 8.0,
this.textColor = Colors.black,
this.backgroundColor = Colors.transparent,
this.suffix,
this.prefix,
this.maxLines = 1,
required this.hintText,
this.hintTextStyle = const TextStyle(color: Colors.grey),
this.labelText,
this.labelStyle,
this.textStyle = const TextStyle(),
this.obscureText = false,
this.isEnabled = true,
this.inputFormatters = const [],
}) : super(key: key);