flare_dart 1.4.6

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

[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: ^1.4.6

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]
87
Health:
Code health derived from static analysis. [more]
96
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
86
Learn more about scoring.

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

  • Dart: 2.5.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.98 points)

1298 out of 1299 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.

Fix lib/actor_drawable.dart. (-1 points)

Analysis of lib/actor_drawable.dart reported 2 hints:

line 64 col 23: This function has a return type of 'bool', but doesn't end with a return statement.

line 70 col 11: Use isNotEmpty instead of length

Fix lib/actor_ik_constraint.dart. (-1 points)

Analysis of lib/actor_ik_constraint.dart reported 2 hints:

line 49 col 37: Use isEmpty instead of length

line 166 col 9: Use isEmpty instead of length

Fix lib/actor_component.dart. (-0.50 points)

Analysis of lib/actor_component.dart reported 1 hint:

line 19 col 20: Use ; instead of {} for empty constructor bodies.

Fix additional 9 files with analysis or formatting issues. (-1 points)

Additional issues in the following files:

  • lib/actor_skin.dart (1 hint)
  • lib/actor_skinnable.dart (1 hint)
  • lib/actor_color.dart (Run dartfmt to format lib/actor_color.dart.)
  • lib/actor_event.dart (Run dartfmt to format lib/actor_event.dart.)
  • lib/actor_flags.dart (Run dartfmt to format lib/actor_flags.dart.)
  • lib/actor_path.dart (Run dartfmt to format lib/actor_path.dart.)
  • lib/animation/interpolation/cubic.dart (Run dartfmt to format lib/animation/interpolation/cubic.dart.)
  • lib/block_reader.dart (Run dartfmt to format lib/block_reader.dart.)
  • lib/json_reader.dart (Run dartfmt to format lib/json_reader.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