Skip to content

Commit 47db560

Browse files
committed
New: sound null migration
1 parent 94275ad commit 47db560

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/src/bubble_floating_animation.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ class BubbleFloatingAnimation {
7575
/// Shuffles the position of bubbles around the screen.
7676
void _shuffle() {
7777
startTime -= Duration(
78-
milliseconds: (this.random.nextDouble() * duration.inMilliseconds).round(),
78+
milliseconds:
79+
(this.random.nextDouble() * duration.inMilliseconds).round(),
7980
);
8081
}
8182

lib/src/bubbles.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class FloatingBubbles extends StatefulWidget {
6767
sizeFactor > 0 && sizeFactor < 0.5,
6868
'Size factor cannot be greater than 0.5 or less than 0',
6969
),
70-
assert(duration != null && duration >= 0, 'duration should not be null or less than 0.'),
70+
assert(duration != null && duration >= 0,
71+
'duration should not be null or less than 0.'),
7172
assert(
7273
opacity >= 0 && opacity <= 255,
7374
'opacity value should be between 0 and 255 inclusive.',
@@ -159,7 +160,9 @@ class _FloatingBubblesState extends State<FloatingBubbles> {
159160
},
160161
)
161162
: PlayAnimation(
162-
duration: checkToStopAnimation == 0 ? Duration(seconds: widget.duration!) : Duration.zero,
163+
duration: checkToStopAnimation == 0
164+
? Duration(seconds: widget.duration!)
165+
: Duration.zero,
163166
tween: ConstantTween(1),
164167
builder: (context, child, value) {
165168
_simulateBubbles();

0 commit comments

Comments
 (0)