setDefaultDecoration static method

InputDecoration? setDefaultDecoration({
  1. TextStyle? hintStyle,
  2. String? hintText,
  3. Color? fillColor,
  4. bool? filled,
  5. Color? focusColor,
  6. OutlineInputBorder? border,
  7. OutlineInputBorder? enabledBorder,
  8. OutlineInputBorder? errorBorder,
  9. OutlineInputBorder? focusBorder,
  10. Widget? suffixIcon,
  11. Widget? prefixIcon,
})

Implementation

static InputDecoration? setDefaultDecoration(
    {TextStyle? hintStyle,
    String? hintText,
    Color? fillColor,
    bool? filled,
    Color? focusColor,
    OutlineInputBorder? border,
    OutlineInputBorder? enabledBorder,
    OutlineInputBorder? errorBorder,
    OutlineInputBorder? focusBorder,
    Widget? suffixIcon,
    Widget? prefixIcon}) {

  return defaultDecoration.copyWith(
      hintStyle: hintStyle,
      hintText: hintText,
      fillColor: fillColor,
      filled: filled ?? true,
      focusColor: focusColor,
      border: border ?? setDefaultBorder(color: colorSecondary),
      enabledBorder: enabledBorder ?? setDefaultBorder(color: colorSecondary),
      errorBorder: errorBorder ?? setDefaultBorder(color: colorError),
      focusedBorder: focusBorder ?? setDefaultBorder(color: colorPrimary),
      suffixIcon: suffixIcon,
      prefixIcon: prefixIcon);
}