FloatingBubbles.alwaysRepeating constructor
FloatingBubbles.alwaysRepeating({
- required int noOfBubbles,
- required List<
Color> colorsOfBubbles, - required double sizeFactor,
- BubbleShape shape = BubbleShape.circle,
- int opacity = 60,
- PaintingStyle paintingStyle = PaintingStyle.fill,
- double strokeWidth = 0,
- int? duration = 0,
- 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.',
);