fix commas

This commit is contained in:
Erlend Fagerheim
2020-04-23 18:10:36 +02:00
parent 21f0cb769f
commit c535ba6a2f
2 changed files with 11 additions and 5 deletions

View File

@ -70,9 +70,14 @@ class _MyHomePageState extends State<MyHomePage> {
const Text('with a complex widget tree and also'),
const Text('some pretty sprite sheet animations :)'),
Flame.util.animationAsWidget(
_position,
animation.Animation.sequenced('minotaur.png', 19,
textureWidth: 96.0, textureHeight: 96)),
_position,
animation.Animation.sequenced(
'minotaur.png',
19,
textureWidth: 96.0,
textureHeight: 96,
),
),
const Text('Neat, hum?'),
const Text(
'By the way, you can also use static sprites as widgets:'),

View File

@ -155,8 +155,9 @@ class Util {
/// This is intended to be used by non-game apps that want to add a sprite sheet animation.
widgets.Widget animationAsWidget(Position size, Animation animation) {
return EmbeddedGameWidget(
BaseGame()..add(AnimationComponent(size.x, size.y, animation)),
size: size);
BaseGame()..add(AnimationComponent(size.x, size.y, animation)),
size: size,
);
}
/// Returns a regular Flutter widget representing this sprite, rendered with the specified size.