diff --git a/lib/util.dart b/lib/util.dart index 86cb98e02..7d094f574 100644 --- a/lib/util.dart +++ b/lib/util.dart @@ -153,6 +153,8 @@ class Util { /// This actually creates an [EmbeddedGameWidget] with a [SimpleGame] whose only content is an [AnimationComponent] created from the provided [animation]. /// You can use this implementation as base to easily create your own widgets based on more complex games. /// This is intended to be used by non-game apps that want to add a sprite sheet animation. + /// + /// @Deprecated('Use FlameSpriteAnimation instead') widgets.Widget animationAsWidget(Position size, Animation animation) { return EmbeddedGameWidget( BaseGame()..add(AnimationComponent(size.x, size.y, animation)), diff --git a/lib/widgets/flame_animation_widget.dart b/lib/widgets/flame_animation_widget.dart index f139d0ed8..489993315 100644 --- a/lib/widgets/flame_animation_widget.dart +++ b/lib/widgets/flame_animation_widget.dart @@ -64,7 +64,7 @@ class _FlameAnimationWidget extends State _lastUpdated = DateTime.now().millisecond; _controller.repeat( // -/+ 60 fps - period: Duration(milliseconds: 16)); + period: const Duration(milliseconds: 16)); }); }