copyWith method

JsonConfigData copyWith({
  1. JsonColorScheme? color,
  2. JsonStyleScheme? style,
  3. bool? animation,
  4. EdgeInsets? itemPadding,
  5. Duration? animationDuration,
  6. Curve? animationCurve,
  7. 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,
  );
}