flare_flutter 1.2.3

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 94

Flare-Flutter #

Flutter runtime for Flare, depends on flare_dart.

Installation #

Add flare_flutter as a dependency in your pubspec.yaml file. If you plan on writing a custom controller or want access to more of the guts of the library, you will want to also include flare_dart which is the base library responsible for loading, instancing, animating, and doing all the work that happens before rendering in flare_flutter. The examples include use cases for both scenarios.

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 applications 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.2.3

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_controller.dart';
import 'package:flare_flutter/flare_controls.dart';
import 'package:flare_flutter/trim_path.dart';
  
Version Uploaded Documentation Archive
1.2.3 Feb 13, 2019 Go to the documentation of flare_flutter 1.2.3 Download flare_flutter 1.2.3 archive
1.2.2 Feb 4, 2019 Go to the documentation of flare_flutter 1.2.2 Download flare_flutter 1.2.2 archive
1.2.1 Feb 1, 2019 Go to the documentation of flare_flutter 1.2.1 Download flare_flutter 1.2.1 archive
1.2.0 Jan 23, 2019 Go to the documentation of flare_flutter 1.2.0 Download flare_flutter 1.2.0 archive
1.1.0 Jan 18, 2019 Go to the documentation of flare_flutter 1.1.0 Download flare_flutter 1.1.0 archive
1.0.11 Jan 7, 2019 Go to the documentation of flare_flutter 1.0.11 Download flare_flutter 1.0.11 archive
1.0.10 Jan 6, 2019 Go to the documentation of flare_flutter 1.0.10 Download flare_flutter 1.0.10 archive
1.0.9 Jan 5, 2019 Go to the documentation of flare_flutter 1.0.9 Download flare_flutter 1.0.9 archive
1.0.8 Jan 4, 2019 Go to the documentation of flare_flutter 1.0.8 Download flare_flutter 1.0.8 archive
1.0.7 Dec 27, 2018 Go to the documentation of flare_flutter 1.0.7 Download flare_flutter 1.0.7 archive

All 17 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
96
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
78
Overall:
Weighted score of the above. [more]
94
Learn more about scoring.

We analyzed this package on Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13
  • Flutter: 1.2.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

The package description is too short. (-12 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and flare_flutter.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

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