copyWith method

  1. @override
CustomPopupTheme copyWith({
  1. Color? backgroundColor,
  2. CustomPopupPosition? position,
  3. CustomPopupButtonTheme? buttonTheme,
  4. double? width,
  5. double? buttonRadius,
  6. double? borderRadius,
  7. double? itemSpacing,
  8. double? spacing,
  9. double? buttonPadding,
})
override

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

Implementation

@override
CustomPopupTheme copyWith({
  Color? backgroundColor,
  CustomPopupPosition? position,
  CustomPopupButtonTheme? buttonTheme,
  double? width,
  double? buttonRadius,
  double? borderRadius,
  double? itemSpacing,
  double? spacing,
  double? buttonPadding,
}) {
  return CustomPopupTheme(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    position: position ?? this.position,
    buttonTheme: buttonTheme ?? this.buttonTheme,
    width: width ?? this.width,
    buttonRadius: buttonRadius ?? this.buttonRadius,
    borderRadius: borderRadius ?? this.borderRadius,
    itemSpacing: itemSpacing ?? this.itemSpacing,
    spacing: spacing ?? this.spacing,
    buttonPadding: buttonPadding ?? this.buttonPadding,
  );
}