copyWith method

ContextMenuTheme copyWith({
  1. ValueGetter<double?>? surfaceOpacity,
  2. ValueGetter<double?>? surfaceBlur,
})

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

Implementation

ContextMenuTheme copyWith({
  ValueGetter<double?>? surfaceOpacity,
  ValueGetter<double?>? surfaceBlur,
}) {
  return ContextMenuTheme(
    surfaceOpacity:
        surfaceOpacity == null ? this.surfaceOpacity : surfaceOpacity(),
    surfaceBlur: surfaceBlur == null ? this.surfaceBlur : surfaceBlur(),
  );
}