flame_lottie 0.4.0+1 copy "flame_lottie: ^0.4.0+1" to clipboard
flame_lottie: ^0.4.0+1 copied to clipboard

Flame wrapper for Lottie by AirBnB. This package implements a bridge between Lottie and Flame, allowing to load and display Lottie animations.

example/lib/main.dart

import 'package:flame/game.dart';
import 'package:flame_lottie/flame_lottie.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(GameWidget(game: LottieExampleGame()));
}

class LottieExampleGame extends FlameGame {
  @override
  Future<void> onLoad() async {
    final asset = await loadLottie(Lottie.asset('assets/LottieLogo1.json'));
    add(
      LottieComponent(
        asset,
        size: Vector2.all(400),
        repeating: true,
      ),
    );
  }
}
11
likes
130
pub points
88%
popularity

Publisher

verified publisherflame-engine.org

Flame wrapper for Lottie by AirBnB. This package implements a bridge between Lottie and Flame, allowing to load and display Lottie animations.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

Funding

Consider supporting this project:

opencollective.com
github.com
patreon.com

License

MIT (LICENSE)

Dependencies

flame, flutter, lottie

More

Packages that depend on flame_lottie