inputDecoration function

  1. @Deprecated('Use [CustomInputDecoration()] instead. This will be removed in the next major version.' 'This feature was deprecated after v0.0.13+2')
InputDecoration inputDecoration(
  1. dynamic context, {
  2. required String hintText,
  3. required String labelText,
  4. int? hintMaxLines,
  5. String? prefixText,
  6. String? suffixText,
  7. IconData prefixIcon = Icons.edit_rounded,
  8. bool showPrefixIcon = true,
  9. Widget? icon,
  10. Widget? suffixIcon,
})

Implementation

@Deprecated(
    'Use [CustomInputDecoration()] instead. This will be removed in the next major version.'
    'This feature was deprecated after v0.0.13+2')
InputDecoration inputDecoration(
  context, {
  required String hintText,
  required String labelText,
  int? hintMaxLines,
  String? prefixText,
  String? suffixText,
  IconData prefixIcon = Icons.edit_rounded,
  bool showPrefixIcon = true,
  Widget? icon,
  Widget? suffixIcon,
}) {
  return InputDecoration(
    hintText: hintText,
    labelText: labelText,
    prefixText: prefixText,
    suffixText: suffixText,
    counter: const SizedBox(
      height: 8,
    ),
    prefixIcon: showPrefixIcon ? Icon(prefixIcon) : null,
    icon: icon,
    suffixIcon: suffixIcon,
    border: OutlineInputBorder(
      borderSide: const BorderSide(),
      borderRadius: BorderRadius.circular(18),
    ),
    hintMaxLines: hintMaxLines,
  );
}