FloatingBubbles.alwaysRepeating constructor

FloatingBubbles.alwaysRepeating({
  1. required int noOfBubbles,
  2. required List<Color> colorsOfBubbles,
  3. required double sizeFactor,
  4. BubbleShape shape = BubbleShape.circle,
  5. int opacity = 60,
  6. PaintingStyle paintingStyle = PaintingStyle.fill,
  7. double strokeWidth = 0,
  8. int? duration = 0,
  9. BubbleSpeed speed = BubbleSpeed.normal,
})

Creates Floating Bubbles that always floats and doesn't stop. All Fields Are Required to make a new Instance of FloatingBubbles.

Implementation

FloatingBubbles.alwaysRepeating({
  required this.noOfBubbles,
  required this.colorsOfBubbles,
  required this.sizeFactor,
  this.shape = BubbleShape.circle,
  this.opacity = 60,
  this.paintingStyle = PaintingStyle.fill,
  this.strokeWidth = 0,
  this.duration = 0,
  this.speed = BubbleSpeed.normal,
})  : assert(
        noOfBubbles >= 1,
        'Number of Bubbles Cannot be less than 1',
      ),
      assert(
        sizeFactor > 0 && sizeFactor < 0.5,
        'Size factor cannot be greater than 0.5 or less than 0',
      ),
      assert(
        opacity >= 0 && opacity <= 255,
        'opacity value should be between 0 and 255 inclusive.',
      );