copyWith method

MenuPopupTheme copyWith({
  1. ValueGetter<double?>? surfaceOpacity,
  2. ValueGetter<double?>? surfaceBlur,
  3. ValueGetter<EdgeInsetsGeometry?>? padding,
  4. ValueGetter<Color?>? fillColor,
  5. ValueGetter<Color?>? borderColor,
  6. ValueGetter<BorderRadiusGeometry?>? borderRadius,
})

Returns a copy of this theme with the given fields replaced.

Implementation

MenuPopupTheme copyWith({
  ValueGetter<double?>? surfaceOpacity,
  ValueGetter<double?>? surfaceBlur,
  ValueGetter<EdgeInsetsGeometry?>? padding,
  ValueGetter<Color?>? fillColor,
  ValueGetter<Color?>? borderColor,
  ValueGetter<BorderRadiusGeometry?>? borderRadius,
}) {
  return MenuPopupTheme(
    surfaceOpacity:
        surfaceOpacity == null ? this.surfaceOpacity : surfaceOpacity(),
    surfaceBlur: surfaceBlur == null ? this.surfaceBlur : surfaceBlur(),
    padding: padding == null ? this.padding : padding(),
    fillColor: fillColor == null ? this.fillColor : fillColor(),
    borderColor: borderColor == null ? this.borderColor : borderColor(),
    borderRadius:
        borderRadius == null ? this.borderRadius : borderRadius(),
  );
}