copyWith method

FlexSchemeOnColors copyWith({
  1. Color? onPrimary,
  2. Color? onPrimaryContainer,
  3. Color? onSecondary,
  4. Color? onSecondaryContainer,
  5. Color? onTertiary,
  6. Color? onTertiaryContainer,
  7. Color? onSurface,
  8. Color? onSurfaceVariant,
  9. Color? onSurfaceDim,
  10. Color? onSurfaceBright,
  11. Color? onSurfaceContainerLowest,
  12. Color? onSurfaceContainerLow,
  13. Color? onSurfaceContainer,
  14. Color? onSurfaceContainerHigh,
  15. Color? onSurfaceContainerHighest,
  16. Color? onInverseSurface,
  17. Color? onError,
  18. Color? onErrorContainer,
  19. @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? onBackground,
})

Copy the object with one or more provided properties changed.

Implementation

FlexSchemeOnColors copyWith({
  Color? onPrimary,
  Color? onPrimaryContainer,
  Color? onSecondary,
  Color? onSecondaryContainer,
  Color? onTertiary,
  Color? onTertiaryContainer,
  Color? onSurface,
  Color? onSurfaceVariant,
  Color? onSurfaceDim,
  Color? onSurfaceBright,
  Color? onSurfaceContainerLowest,
  Color? onSurfaceContainerLow,
  Color? onSurfaceContainer,
  Color? onSurfaceContainerHigh,
  Color? onSurfaceContainerHighest,
  Color? onInverseSurface,
  Color? onError,
  Color? onErrorContainer,
  @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? onBackground,
}) {
  return FlexSchemeOnColors(
    onPrimary: onPrimary ?? this.onPrimary,
    onPrimaryContainer: onPrimaryContainer ?? this.onPrimaryContainer,
    onSecondary: onSecondary ?? this.onSecondary,
    onSecondaryContainer: onSecondaryContainer ?? this.onSecondaryContainer,
    onTertiary: onTertiary ?? this.onTertiary,
    onTertiaryContainer: onTertiaryContainer ?? this.onTertiaryContainer,
    onSurface: onSurface ?? this.onSurface,
    onSurfaceVariant: onSurfaceVariant ?? this.onSurfaceVariant,
    onSurfaceDim: onSurfaceDim ?? this.onSurfaceDim,
    onSurfaceBright: onSurfaceBright ?? this.onSurfaceBright,
    onSurfaceContainerLowest:
        onSurfaceContainerLowest ?? this.onSurfaceContainerLowest,
    onSurfaceContainerLow:
        onSurfaceContainerLow ?? this.onSurfaceContainerLow,
    onSurfaceContainer: onSurfaceContainer ?? this.onSurfaceContainer,
    onSurfaceContainerHigh:
        onSurfaceContainerHigh ?? this.onSurfaceContainerHigh,
    onSurfaceContainerHighest:
        onSurfaceContainerHighest ?? this.onSurfaceContainerHighest,
    onInverseSurface: onInverseSurface ?? this.onInverseSurface,
    onError: onError ?? this.onError,
    onErrorContainer: onErrorContainer ?? this.onErrorContainer,
  );
}