copyWith method

FlexSchemeSurfaceColors copyWith({
  1. Color? surface,
  2. Color? surfaceDim,
  3. Color? surfaceBright,
  4. Color? surfaceContainerLowest,
  5. Color? surfaceContainerLow,
  6. Color? surfaceContainer,
  7. Color? surfaceContainerHigh,
  8. Color? surfaceContainerHighest,
  9. Color? inverseSurface,
  10. Color? scaffoldBackground,
  11. Color? dialogBackground,
  12. @Deprecated('This color was deprecated in FCS 8.0 because Flutter 3.22 ' 'deprecated the color. ' 'It no longer has any function in FCS v8 and will be removed in v9.') Color? surfaceVariant,
  13. @Deprecated('This color was deprecated in FCS 8.0 because Flutter 3.22 ' 'deprecated the color. ' 'It no longer has any function in FCS v8 and will be removed in v9.') Color? background,
})

Copy the object with one or more provided properties changed.

Implementation

FlexSchemeSurfaceColors copyWith({
  Color? surface,
  Color? surfaceDim,
  Color? surfaceBright,
  Color? surfaceContainerLowest,
  Color? surfaceContainerLow,
  Color? surfaceContainer,
  Color? surfaceContainerHigh,
  Color? surfaceContainerHighest,
  Color? inverseSurface,
  Color? scaffoldBackground,
  Color? dialogBackground,
  @Deprecated('This color was deprecated in FCS 8.0 because Flutter 3.22 '
      'deprecated the color. '
      'It no longer has any function in FCS v8 and will be removed in v9.')
  Color? surfaceVariant,
  @Deprecated('This color was deprecated in FCS 8.0 because Flutter 3.22 '
      'deprecated the color. '
      'It no longer has any function in FCS v8 and will be removed in v9.')
  Color? background,
}) {
  return FlexSchemeSurfaceColors(
    surface: surface ?? this.surface,
    surfaceDim: surfaceDim ?? this.surfaceDim,
    surfaceBright: surfaceBright ?? this.surfaceBright,
    surfaceContainerLowest:
        surfaceContainerLowest ?? this.surfaceContainerLowest,
    surfaceContainerLow: surfaceContainerLow ?? this.surfaceContainerLow,
    surfaceContainer: surfaceContainer ?? this.surfaceContainer,
    surfaceContainerHigh: surfaceContainerHigh ?? this.surfaceContainerHigh,
    surfaceContainerHighest:
        surfaceContainerHighest ?? this.surfaceContainerHighest,
    inverseSurface: inverseSurface ?? this.inverseSurface,
    scaffoldBackground: scaffoldBackground ?? this.scaffoldBackground,
    dialogBackground: dialogBackground ?? this.dialogBackground,
  );
}