'ticker' is deprecated and shouldn't be used. Will be removed in Flame v1.9, use createTicker() instead

66 Views Asked by At

Warning of deprecation : package:flame/src/sprite_animation.dart SpriteAnimationTicker ticker()
Containing class: SpriteAnimation
Returns a new instance of SpriteAnimationTicker

ticker() method is depreciated and will be removed in Flame v1.9, How to do it?

1

There are 1 best solutions below

0
Sweta Jain On BEST ANSWER

Simply replace your ticker() method as given example:

animation : Returns the current [SpriteAnimation].

animation?.ticker().completed;

with:

animation?.createTicker().completed;