A late initialization warning was being triggered when leaving the
home/dashboard page when the random hybrid animation is disabled.
Initialize the associated timer member as null and add logic to
avoid referencing it in the non-random case where the timer does
not get created.
Bug-AGL: SPEC-5027
Change-Id: I63bd21db3005f70f2fe0d2d34181d0079cd25b00
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
late AnimationController _animationController;
late Animation<double> _animation;
static bool _isAnimationPlayed = false;
- late Timer timer;
+ Timer? timer = null;
@override
void initState() {
@override
void dispose() {
_animationController.dispose();
- timer.cancel();
+ if (timer != null)
+ timer?.cancel();
super.dispose();
}