|
|
@ -23,6 +23,24 @@ class BonusAnimation extends StatelessWidget {
|
|
|
|
key: key,
|
|
|
|
key: key,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BonusAnimation.sparkyTurboCharge({
|
|
|
|
|
|
|
|
Key? key,
|
|
|
|
|
|
|
|
VoidCallback? onCompleted,
|
|
|
|
|
|
|
|
}) : this._(
|
|
|
|
|
|
|
|
Assets.images.bonusAnimation.sparkyTurboCharge.keyName,
|
|
|
|
|
|
|
|
onCompleted: onCompleted,
|
|
|
|
|
|
|
|
key: key,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BonusAnimation.dino({
|
|
|
|
|
|
|
|
Key? key,
|
|
|
|
|
|
|
|
VoidCallback? onCompleted,
|
|
|
|
|
|
|
|
}) : this._(
|
|
|
|
|
|
|
|
Assets.images.bonusAnimation.dino.keyName,
|
|
|
|
|
|
|
|
onCompleted: onCompleted,
|
|
|
|
|
|
|
|
key: key,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
final String image;
|
|
|
|
final String image;
|
|
|
|
|
|
|
|
|
|
|
|
final VoidCallback? onCompleted;
|
|
|
|
final VoidCallback? onCompleted;
|
|
|
@ -34,7 +52,7 @@ class BonusAnimation extends StatelessWidget {
|
|
|
|
// TODO(arturplaczek): Load assets in parent widget, remove future builder
|
|
|
|
// TODO(arturplaczek): Load assets in parent widget, remove future builder
|
|
|
|
// and user image from cache.
|
|
|
|
// and user image from cache.
|
|
|
|
return FutureBuilder<Image>(
|
|
|
|
return FutureBuilder<Image>(
|
|
|
|
future: Flame.images.load(Assets.images.bonusAnimation.dashNest.keyName),
|
|
|
|
future: Flame.images.load(image),
|
|
|
|
builder: (BuildContext context, AsyncSnapshot<Image> snapshot) {
|
|
|
|
builder: (BuildContext context, AsyncSnapshot<Image> snapshot) {
|
|
|
|
if (snapshot.hasData) {
|
|
|
|
if (snapshot.hasData) {
|
|
|
|
final spriteSheet = SpriteSheet.fromColumnsAndRows(
|
|
|
|
final spriteSheet = SpriteSheet.fromColumnsAndRows(
|
|
|
|