Flare-Flutter

Flutter runtime written in Dart with SKIA based rendering.

Installation

Add flare_flutter as a dependency in your pubspec.yaml file.

Exporting for Flutter

Export from Flare with the "Export to Engine" menu. In the Engine dropdown, choose Flutter, and in the Format dropdown your favorite form of compression.

Adding Assets

Once you've exported your file, add the .flr file to your project's Flutter assets.

Example

Take a look at the provided example application for how to use the FlutterActor widget with an exported Flutter character.

Usage

The easiest way to get started is by using the provided FlareActor widget. This is a stateless Flutter widget that allows for one Flare file with one active animation playing to be embedded in your Flutter App.

You can change the currently playing animation by changing the animation property's name.

You can also specify the mixSeconds to determine how long it takes for the animation to interpolate from the previous one. A value of 0 means that it will just pop to the new animation. A value of 0.5 will mean it takes half of a second to fully mix the new animation on top of the old one.

import 'package:flare_flutter/flare_actor.dart';
class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => new _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return new FlareActor("assets/Filip.flr", alignment:Alignment.center, fit:BoxFit.contain, animation:"idle");
  }
}

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request.

License

See the LICENSE file for license rights and limitations (MIT).

Libraries

aabb
actor
actor_animation
actor_artboard
actor_axis_constraint
actor_bone
actor_bone_base
actor_color
actor_component
actor_constraint
actor_distance_constraint
actor_drawable
actor_ellipse
actor_event
actor_flags
actor_ik_constraint
actor_image
actor_jelly_bone
actor_loader
actor_node
actor_node_solo
actor_path
actor_polygon
actor_rectangle
actor_root_bone
actor_rotation_constraint
actor_scale_constraint
actor_shape
actor_skin
actor_skinnable
actor_star
actor_targeted_constraint
actor_transform_constraint
actor_translation_constraint
actor_triangle
binary_reader
block_reader
block_types
cubic
dependency_sorter
flare
flare_actor
hold
interpolator
jelly_component
json_block_reader
json_reader
keyframe
linear
mat2d
path_point
property_types
stream_reader
transform_components
transform_space
vec2d