copyWith method

DrawConfig copyWith({
  1. double? maxRandomnessOffset,
  2. double? roughness,
  3. double? bowing,
  4. double? curveFitting,
  5. double? curveTightness,
  6. double? curveStepCount,
  7. double? fillWeight,
  8. int? seed,
  9. bool? combineNestedSvgPaths,
  10. Randomizer? randomizer,
})

Creates a copy of this configuration with the given fields replaced.

Implementation

DrawConfig copyWith({
  double? maxRandomnessOffset,
  double? roughness,
  double? bowing,
  double? curveFitting,
  double? curveTightness,
  double? curveStepCount,
  double? fillWeight,
  int? seed,
  bool? combineNestedSvgPaths,
  Randomizer? randomizer,
}) {
  final effectiveSeed = seed ?? this.seed;
  return DrawConfig._(
    maxRandomnessOffset: maxRandomnessOffset ?? this.maxRandomnessOffset,
    roughness: roughness ?? this.roughness,
    bowing: bowing ?? this.bowing,
    curveFitting: curveFitting ?? this.curveFitting,
    curveTightness: curveTightness ?? this.curveTightness,
    curveStepCount: curveStepCount ?? this.curveStepCount,
    seed: effectiveSeed,
    randomizer: randomizer ?? Randomizer(seed: effectiveSeed),
  );
}