copyWith method
JsonConfigData
copyWith({
- JsonColorScheme? color,
- JsonStyleScheme? style,
- bool? animation,
- EdgeInsets? itemPadding,
- Duration? animationDuration,
- Curve? animationCurve,
- int? gap,
copy another JsonConfigData
Implementation
JsonConfigData copyWith({
JsonColorScheme? color,
JsonStyleScheme? style,
bool? animation,
EdgeInsets? itemPadding,
Duration? animationDuration,
Curve? animationCurve,
int? gap,
}) {
final colorScheme = this.color == null ? color : this.color!.merge(color);
final styleScheme = this.style == null ? style : this.style!.merge(style);
return JsonConfigData(
color: colorScheme,
style: styleScheme,
animation: animation ?? this.animation,
itemPadding: itemPadding ?? this.itemPadding,
animationDuration: animationDuration ?? this.animationDuration,
animationCurve: animationCurve ?? this.animationCurve,
gap: gap ?? this.gap,
);
}