copyWith method

DropdownMenuThemeData copyWith({
  1. TextStyle? textStyle,
  2. Object? inputDecorationTheme,
  3. MenuStyle? menuStyle,
  4. Color? disabledColor,
})

Creates a copy of this object with the given fields replaced with the new values.

Implementation

DropdownMenuThemeData copyWith({
  TextStyle? textStyle,
  // TODO(bleroux): Clean this up once `InputDecorationTheme` is fully normalized.
  Object? inputDecorationTheme,
  MenuStyle? menuStyle,
  Color? disabledColor,
}) {
  return DropdownMenuThemeData(
    textStyle: textStyle ?? this.textStyle,
    inputDecorationTheme: inputDecorationTheme ?? this.inputDecorationTheme,
    menuStyle: menuStyle ?? this.menuStyle,
    disabledColor: disabledColor ?? this.disabledColor,
  );
}