Skip to content

Commit

Permalink
Fixed bug with TextLiquidFill to cancel the wave when the load has co…
Browse files Browse the repository at this point in the history
…mpleted.
  • Loading branch information
awhitford committed Oct 23, 2020
1 parent 8383d53 commit dc6ed02
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/src/text_liquid_fill.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ class _TextLiquidFillState extends State<TextLiquidFill>
duration: widget.loadDuration,
);

_loadValue = Tween<double>(begin: 0.0, end: 100.0).animate(_loadController);
_loadValue = Tween<double>(begin: 0.0, end: 100.0).animate(_loadController)
..addStatusListener((status) {
if (AnimationStatus.completed == status) {
// Stop the repeating wave when the load has completed
_waveController.stop();
}
});

_waveController.repeat();
_loadController.forward();
Expand Down

0 comments on commit dc6ed02

Please sign in to comment.