diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e3d56ee9..7eb24672e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixes aseprite constructor bug - Improve error handling for the onLoad function - Add test for child removal + - Fix bug where `Timer` callback doesn't fire for non-repeating timers, also fixing bug with `Particle` lifespan ## 1.0.0-rc5 - Option for overlays to be already visible on the GameWidget diff --git a/lib/timer.dart b/lib/timer.dart index 533737e09..099a5ed37 100644 --- a/lib/timer.dart +++ b/lib/timer.dart @@ -29,6 +29,7 @@ class Timer { if (_current >= limit) { if (!repeat) { _running = false; + callback?.call(); return; } // This is used to cover the rare case of _current being more than