flutteranimationspritetickerflame

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


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?


Solution

  • Simply replace your ticker() method as given example:

    animation : Returns the current [SpriteAnimation].

    animation?.ticker().completed;
    

    with:

    animation?.createTicker().completed;