InputField constructor

const InputField({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? initialValue,
  4. String? hintText,
  5. ValueChanged<String>? onChanged,
  6. ValueChanged<String>? onSubmitted,
  7. TextInputType? keyboardType,
  8. TextInputAction? textInputAction,
  9. bool obscureText = false,
  10. bool readOnly = false,
  11. bool enabled = true,
  12. IconData? prefixIcon,
  13. IconData? suffixIcon,
  14. VoidCallback? onSuffixTap,
  15. String? errorText,
  16. List<TextInputFormatter>? inputFormatters,
})

Implementation

const InputField({super.key,

  this.controller,
  this.initialValue,
  this.hintText,
  this.onChanged,
  this.onSubmitted,
  this.keyboardType,
  this.textInputAction,
  this.obscureText = false,
  this.readOnly = false,
  this.enabled = true,
  this.prefixIcon,
  this.suffixIcon,
  this.onSuffixTap,
  this.errorText,
  this.inputFormatters,
}) : assert(
       controller == null || initialValue == null,
       'Cannot provide both controller and initialValue',
     );