flare_flutter 1.0.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new81

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).

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flare_flutter: ^1.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flare_flutter/flare.dart';
import 'package:flare_flutter/flare/actor.dart';
import 'package:flare_flutter/flare/actor_artboard.dart';
import 'package:flare_flutter/flare/actor_axis_constraint.dart';
import 'package:flare_flutter/flare/actor_bone.dart';
import 'package:flare_flutter/flare/actor_bone_base.dart';
import 'package:flare_flutter/flare/actor_color.dart';
import 'package:flare_flutter/flare/actor_component.dart';
import 'package:flare_flutter/flare/actor_constraint.dart';
import 'package:flare_flutter/flare/actor_distance_constraint.dart';
import 'package:flare_flutter/flare/actor_drawable.dart';
import 'package:flare_flutter/flare/actor_ellipse.dart';
import 'package:flare_flutter/flare/actor_event.dart';
import 'package:flare_flutter/flare/actor_flags.dart';
import 'package:flare_flutter/flare/actor_ik_constraint.dart';
import 'package:flare_flutter/flare/actor_image.dart';
import 'package:flare_flutter/flare/actor_jelly_bone.dart';
import 'package:flare_flutter/flare/actor_loader.dart';
import 'package:flare_flutter/flare/actor_node.dart';
import 'package:flare_flutter/flare/actor_node_solo.dart';
import 'package:flare_flutter/flare/actor_path.dart';
import 'package:flare_flutter/flare/actor_polygon.dart';
import 'package:flare_flutter/flare/actor_rectangle.dart';
import 'package:flare_flutter/flare/actor_root_bone.dart';
import 'package:flare_flutter/flare/actor_rotation_constraint.dart';
import 'package:flare_flutter/flare/actor_scale_constraint.dart';
import 'package:flare_flutter/flare/actor_shape.dart';
import 'package:flare_flutter/flare/actor_skin.dart';
import 'package:flare_flutter/flare/actor_skinnable.dart';
import 'package:flare_flutter/flare/actor_star.dart';
import 'package:flare_flutter/flare/actor_targeted_constraint.dart';
import 'package:flare_flutter/flare/actor_transform_constraint.dart';
import 'package:flare_flutter/flare/actor_translation_constraint.dart';
import 'package:flare_flutter/flare/actor_triangle.dart';
import 'package:flare_flutter/flare/animation/actor_animation.dart';
import 'package:flare_flutter/flare/animation/keyframe.dart';
import 'package:flare_flutter/flare/animation/property_types.dart';
import 'package:flare_flutter/flare/binary_reader.dart';
import 'package:flare_flutter/flare/block_reader.dart';
import 'package:flare_flutter/flare/block_types.dart';
import 'package:flare_flutter/flare/dependency_sorter.dart';
import 'package:flare_flutter/flare/jelly_component.dart';
import 'package:flare_flutter/flare/json_block_reader.dart';
import 'package:flare_flutter/flare/json_reader.dart';
import 'package:flare_flutter/flare/math/aabb.dart';
import 'package:flare_flutter/flare/math/mat2d.dart';
import 'package:flare_flutter/flare/math/transform_components.dart';
import 'package:flare_flutter/flare/math/vec2d.dart';
import 'package:flare_flutter/flare/path_point.dart';
import 'package:flare_flutter/flare/stream_reader.dart';
import 'package:flare_flutter/flare/transform_space.dart';
import 'package:flare_flutter/flare_actor.dart';
  
Version Uploaded Documentation Archive
1.0.2 Dec 7, 2018 Go to the documentation of flare_flutter 1.0.2 Download flare_flutter 1.0.2 archive
1.0.1 Dec 7, 2018 Go to the documentation of flare_flutter 1.0.1 Download flare_flutter 1.0.1 archive
1.0.0 Dec 6, 2018 Go to the documentation of flare_flutter 1.0.0 Download flare_flutter 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
78
Health:
Code health derived from static analysis. [more]
89
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
81
Learn more about scoring.

We analyzed this package on Dec 7, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs (-9.94 points)

1237 out of 1245 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Fix lib/flare/actor_color.dart. (-0.50 points)

Analysis of lib/flare/actor_color.dart reported 1 hint:

line 8 col 8: Unused import: 'actor.dart'.

Fix lib/flare/actor_loader.dart. (-0.50 points)

Analysis of lib/flare/actor_loader.dart reported 1 hint:

line 9 col 18: The value of the local variable 'reader' isn't used.

Fix lib/flare/animation/actor_animation.dart. (-0.50 points)

Analysis of lib/flare/animation/actor_animation.dart reported 1 hint:

line 286 col 7: The value of the field '_fps' isn't used.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use flare_flutter.dart. Packages with multiple examples should use example/readme.md.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.58.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test