copyWith method

  1. @override
ComTheme copyWith({
  1. MaterialColor? theme,
  2. Gradient? primaryGradient,
  3. ComShapes? shapes,
  4. ComSpacing? spacing,
  5. Color? success,
  6. Color? error,
  7. Color? warning,
  8. Color? link,
})
override

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

Implementation

@override
ComTheme copyWith({
  MaterialColor? theme,
  Gradient? primaryGradient,
  ComShapes? shapes,
  ComSpacing? spacing,
  Color? success,
  Color? error,
  Color? warning,
  Color? link,
}) {
  return ComTheme(
    shapes: shapes ?? this.shapes,
    spacing: spacing ?? this.spacing,
    success: success ?? this.success,
    error: error ?? this.error,
    warning: warning ?? this.warning,
    link: link ?? this.link,
  );
}