mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Based on issue #147799, this pull request adds two `AnimationStatus` getters. ```dart bool get isRunning => switch (this) { forward || reverse => true, completed || dismissed => false, }; bool get aimedForward => switch (this) { forward || completed => true, reverse || dismissed => false, }; ``` I also added a `.toggle()` method for animation controllers that makes use of `aimedForward`.