copyWith method

  1. @override
CustomPopupButtonTheme copyWith({
  1. Color? backgroundColor,
  2. Color? foregroundColor,
  3. double? padding,
  4. double? spacing,
  5. double? borderRadius,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
CustomPopupButtonTheme copyWith({
  Color? backgroundColor,
  Color? foregroundColor,
  double? padding,
  double? spacing,
  double? borderRadius,
}) {
  return CustomPopupButtonTheme(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    foregroundColor: foregroundColor ?? this.foregroundColor,
    padding: padding ?? this.padding,
    spacing: spacing ?? this.spacing,
    borderRadius: borderRadius ?? this.borderRadius,
  );
}