setDefaultDecoration static method
InputDecoration?
setDefaultDecoration({
- TextStyle? hintStyle,
- String? hintText,
- Color? fillColor,
- bool? filled,
- Color? focusColor,
- OutlineInputBorder? border,
- OutlineInputBorder? enabledBorder,
- OutlineInputBorder? errorBorder,
- OutlineInputBorder? focusBorder,
- Widget? suffixIcon,
- 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);
}