flame_lottie 0.2.0+3 copy "flame_lottie: ^0.2.0+3" to clipboard
flame_lottie: ^0.2.0+3 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() async {
  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
0
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.

Homepage
Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

opencollective.com
github.com
patreon.com

License

unknown (license)

Dependencies

flame, flutter, lottie

More

Packages that depend on flame_lottie