copyWith method

BubbleOptions copyWith({
  1. int? bubbleCount,
  2. double? minTargetRadius,
  3. double? maxTargetRadius,
  4. double? growthRate,
  5. double? popRate,
})

Creates a copy of this BubbleOptions but with the given fields replaced with new values.

Implementation

BubbleOptions copyWith({
  int? bubbleCount,
  double? minTargetRadius,
  double? maxTargetRadius,
  double? growthRate,
  double? popRate,
}) {
  return BubbleOptions(
    bubbleCount: bubbleCount ?? this.bubbleCount,
    minTargetRadius: minTargetRadius ?? this.minTargetRadius,
    maxTargetRadius: maxTargetRadius ?? this.maxTargetRadius,
    growthRate: growthRate ?? this.growthRate,
    popRate: popRate ?? this.popRate,
  );
}