AppTextField constructor

const AppTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. void onChange(
    1. String
    )?,
  4. TextInputType keyboardType = TextInputType.text,
  5. String? validator(
    1. String?
    )?,
  6. double borderRadius = 8.0,
  7. Color textColor = Colors.black,
  8. Color backgroundColor = Colors.transparent,
  9. Widget? suffix,
  10. Widget? prefix,
  11. int maxLines = 1,
  12. required String hintText,
  13. TextStyle hintTextStyle = const TextStyle(color: Colors.grey),
  14. String? labelText,
  15. TextStyle? labelStyle,
  16. TextStyle textStyle = const TextStyle(),
  17. bool obscureText = false,
  18. bool isEnabled = true,
  19. 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);