flare_dart 2.2.4

  • Readme
  • Changelog
  • Installing
  • 88

Flare-Dart #

Flutter runtime written in Dart. See Flare for details.

Installation #

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

License #

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

[2.2.4] - 2019-11-07 12:14:49

  • Adding support for ActorImage.isDynamic which allows Flare to pacakge source UV coordinates for the image such that it can be swapped at runtime. This requires re-exporting files from Flare after marking the image as dynamic in the Flare UI.

[2.2.3] - 2019-10-29 12:44:02

  • Copy transformAffectsStroke from the source shape when instancing.

[2.2.2] - 2019-10-11 12:55:44

  • Call openObject before reading clip node and intersect, closeObject after. Fixes issue with reading in new clips in JSON.

[2.2.1] - 2019-10-11 12:38:09

  • Mitigate path keyframes exported for non-paths (fixing this on Flare side too).

[2.2.0] - 2019-10-09 11:19:06

  • Fix merge bug that sneaked into pub.

[2.1.0] - 2019-10-09 11:08:05

  • Adding support for difference clipping.

[2.0.0] - 2019-10-08 13:38:26

  • Fixing up various static analysis issues.
  • Need to bump version to 2.0.0 due to breaking changes between flare_flutter and flare_dart caused by resolving analysis issues.

[1.4.9] - 2019-10-07 11:20:58

  • Supporting Nodes inside of Shapes, effectively adding multiple transform spaces inside of a shape.

[1.4.8] - 2019-09-30 21:19:37

  • Fixing linting problems in ActorDrawable and ActorSkin.

[1.4.7] - 2019-09-23 16:42:53

  • Added support for transformAffectsStroke property on ActorShape.

[1.4.6] - 2019-09-04 08:48:11

  • Prevent iterating null children. Fixes issue #146.

[1.4.5] - 2019-08-23 09:51:30

Small changes to fix warnings caught by the Dart static analyzer.

[1.4.4] - 2019-07-24 11:43:51

Adding getArtboard method to Actor class. Allows finding artboards by name.

[1.4.3] - 2019-07-06 11:08:53

Some cleanup done while fixing issue #104 (using intrinsic artboard size as an option).

[1.4.2] - 2019-06-20 16:30:37

Fixing issue with rounded rectangles not rendering correctly #107 Shapes that are collapsed are not when building up the clip path..

[1.4.1] - 2019-05-20 10:40:04

Adding an areEquals method to Mat2D.

[1.4.0] - 2019-04-23 19:43:01

Improving load times by using ByteData views when possible in favor of reading data in tight loops.

[1.3.6] - 2019-04-08 08:46:05

Fixed an issue with instanced copies not including trim path values.

[1.3.5] - 2019-04-06 19:04:55

Allow overriding instance nodes so that custom paint effects and operations can be applied to Images and Shapes.

[1.3.4] - 2019-03-25 20:02:50

Validate draw order keyframe value is applying values to valid ActorDrawables. We had a condition in Flare that would export null drawOrder values, which would resolve to 0 in binary, causing the keyframe to point to a 0 indexed component. The fix is to both make the runtime library more resilient and to fix the exporter. Both have been done.

[1.3.3] - 2019-03-12 09:24:20

Added link to Flare-Flutter in README.

[1.3.2] - 2019-03-07 12:46:33

Split the color from ActorColor and the display color (which can be overriden by the Artboard) into two separate getters so that the animation keyframes don't overwrite the override color.

Use this package as a library

1. Depend on it

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


dependencies:
  flare_dart: ^2.2.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:flare_dart/actor.dart';
import 'package:flare_dart/actor_artboard.dart';
import 'package:flare_dart/actor_axis_constraint.dart';
import 'package:flare_dart/actor_bone.dart';
import 'package:flare_dart/actor_bone_base.dart';
import 'package:flare_dart/actor_color.dart';
import 'package:flare_dart/actor_component.dart';
import 'package:flare_dart/actor_constraint.dart';
import 'package:flare_dart/actor_distance_constraint.dart';
import 'package:flare_dart/actor_drawable.dart';
import 'package:flare_dart/actor_ellipse.dart';
import 'package:flare_dart/actor_event.dart';
import 'package:flare_dart/actor_flags.dart';
import 'package:flare_dart/actor_ik_constraint.dart';
import 'package:flare_dart/actor_image.dart';
import 'package:flare_dart/actor_jelly_bone.dart';
import 'package:flare_dart/actor_node.dart';
import 'package:flare_dart/actor_node_solo.dart';
import 'package:flare_dart/actor_path.dart';
import 'package:flare_dart/actor_polygon.dart';
import 'package:flare_dart/actor_rectangle.dart';
import 'package:flare_dart/actor_root_bone.dart';
import 'package:flare_dart/actor_rotation_constraint.dart';
import 'package:flare_dart/actor_scale_constraint.dart';
import 'package:flare_dart/actor_shape.dart';
import 'package:flare_dart/actor_skin.dart';
import 'package:flare_dart/actor_skinnable.dart';
import 'package:flare_dart/actor_star.dart';
import 'package:flare_dart/actor_targeted_constraint.dart';
import 'package:flare_dart/actor_transform_constraint.dart';
import 'package:flare_dart/actor_translation_constraint.dart';
import 'package:flare_dart/actor_triangle.dart';
import 'package:flare_dart/animation/actor_animation.dart';
import 'package:flare_dart/animation/interpolation/cubic.dart';
import 'package:flare_dart/animation/interpolation/cubic_ease.dart';
import 'package:flare_dart/animation/interpolation/hold.dart';
import 'package:flare_dart/animation/interpolation/interpolator.dart';
import 'package:flare_dart/animation/interpolation/linear.dart';
import 'package:flare_dart/animation/keyframe.dart';
import 'package:flare_dart/animation/property_types.dart';
import 'package:flare_dart/binary_reader.dart';
import 'package:flare_dart/block_reader.dart';
import 'package:flare_dart/block_types.dart';
import 'package:flare_dart/dependency_sorter.dart';
import 'package:flare_dart/jelly_component.dart';
import 'package:flare_dart/json_block_reader.dart';
import 'package:flare_dart/json_reader.dart';
import 'package:flare_dart/math/aabb.dart';
import 'package:flare_dart/math/mat2d.dart';
import 'package:flare_dart/math/transform_components.dart';
import 'package:flare_dart/math/vec2d.dart';
import 'package:flare_dart/path_point.dart';
import 'package:flare_dart/stream_reader.dart';
import 'package:flare_dart/transform_space.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
88
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
88
Learn more about scoring.

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

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Health issues and suggestions

Document public APIs. (-0.95 points)

1308 out of 1310 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/actor_color.dart.

Run dartfmt to format lib/actor_color.dart.

Format lib/actor_constraint.dart.

Run dartfmt to format lib/actor_constraint.dart.

Format lib/actor_event.dart.

Run dartfmt to format lib/actor_event.dart.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/actor_flags.dart (Run dartfmt to format lib/actor_flags.dart.)
  • lib/actor_ik_constraint.dart (Run dartfmt to format lib/actor_ik_constraint.dart.)
  • lib/actor_image.dart (Run dartfmt to format lib/actor_image.dart.)
  • lib/animation/actor_animation.dart (Run dartfmt to format lib/animation/actor_animation.dart.)

Maintenance suggestions

The package description is too short. (-20 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_dart.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.1.0 <3.0.0