copyWith method

DashboardCardStyle copyWith({
  1. Color? backgroundColor,
  2. Color? borderColor,
  3. double? borderWidth,
  4. double? cornerRadius,
  5. EdgeInsetsGeometry? padding,
  6. TextStyle? labelStyle,
  7. TextStyle? valueStyle,
  8. TextStyle? unitStyle,
  9. double? glowOpacity,
  10. Color? trackColor,
})

Returns a copy with the given fields replaced.

Implementation

DashboardCardStyle copyWith({
  Color? backgroundColor,
  Color? borderColor,
  double? borderWidth,
  double? cornerRadius,
  EdgeInsetsGeometry? padding,
  TextStyle? labelStyle,
  TextStyle? valueStyle,
  TextStyle? unitStyle,
  double? glowOpacity,
  Color? trackColor,
}) {
  return DashboardCardStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    borderColor: borderColor ?? this.borderColor,
    borderWidth: borderWidth ?? this.borderWidth,
    cornerRadius: cornerRadius ?? this.cornerRadius,
    padding: padding ?? this.padding,
    labelStyle: labelStyle ?? this.labelStyle,
    valueStyle: valueStyle ?? this.valueStyle,
    unitStyle: unitStyle ?? this.unitStyle,
    glowOpacity: glowOpacity ?? this.glowOpacity,
    trackColor: trackColor ?? this.trackColor,
  );
}