fieldDecoration static method

InputDecoration fieldDecoration(
  1. BuildContext context,
  2. String hintText,
  3. String helperText, {
  4. Widget? prefixIcon,
  5. Widget? suffixIcon,
})

Implementation

static InputDecoration fieldDecoration(
  BuildContext context,
  String hintText,
  String helperText, {
  Widget? prefixIcon,
  Widget? suffixIcon,
}) {
  return InputDecoration(
    // contentPadding: EdgeInsets.all(6),
    hintText: hintText,
    helperText: helperText,
    prefixIcon: prefixIcon,
    suffixIcon: suffixIcon,
    enabledBorder: OutlineInputBorder(
      borderSide: BorderSide(
        color: Theme.of(context).primaryColor,
        width: 1,
      ),
    ),
    border: OutlineInputBorder(
      borderSide: BorderSide(
        color: Theme.of(context).primaryColor,
        width: 1,
      ),
    ),
  );
}