flame_flare 0.1.0

Flutter Android iOS

This packages allows you to use flare animations into a flame game.

Pub Test Discord

Flame Flare #

Integrate awesome Flare animations to your Flame game.

Install #

Add flame_flare as a dependency in your pubspec.yaml file (what?).

Import the package:

import 'package:flame_flare/flame_flare.dart';

Usage #

This lib exposes a set of tools to integrate a flare animation into a flame game, they are:

  • FlareActorAnimation: A simple animation object that wraps a FlareActorRenderBox.
  • FlareActorComponent: A Flame's PositionComponent sub class that receives and render a FlareActorAnimation.
  • FlareParticle: A Flame's Particle sub class that receives and renders a FlareActorAnimation as a particle.

Simple usage #


class MyAnimationController extends FlareControls {
  void playSomeAnimation() {
    play("Some animation");
  }
}

class MyAnimationComponent extends FlareActorComponent {
  final MyAnimationController animationController;

  MyAnimationComponent(this.animationController)
      : super(FlareActorAnimation(
          'assets/my_animation.flr',
          controller: animationController,
          fit: BoxFit.contain,
          alignment: Alignment.bottomCenter,
          width: 306,
          height: 500,
        ));
}

See the example app for a slightly more complex usage.

Support #

The simplest way to show us your support is by giving the project a star.

You can also support us by becoming a patron on Patreon: Patreon

Or by making a single donation by buying us a coffee: Buy Me A Coffee

3
likes
100
pub points
70%
popularity

Publisher

flame-engine.org

This packages allows you to use flare animations into a flame game.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flame, flare_dart, flare_flutter, flutter, memoize

More

Packages that depend on flame_flare