flare_loading 2.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 89

flare_loading #

pub package

Loading widget based on a Flare animation, allow you to create custom loading widgets or dialogs

Usage #

FlareLoading(
  name: 'animation.flr', 
  startAnimation: 'intro',
  loopAnimation: 'circle',
  endAnimation: 'end',
);

name: path and name of the flare animation

until: callback that return a future to process your initialization

isLoading: alternative to until if you want to manage loading state with a boolean

loopAnimation: animation name to run in loop

endAnimation: animation name to run once until is complete or isLoading false

startAnimation: animation name to run once as start

height: force the height of the flare animation, by default it take the all place available

width: force the width of the flare animation, by default it take the all place available

alignment: alignment of the flare animation, center by default

onSuccess callback called when the animation is finished and isLoading is false or until is complete

onError callback called until has failed

Available mode #

Only one animation #

Basically you have one animation to show and then just need to stay at last frame. In order to do that only specify the startAnimation

Start and loop animation #

Your animation have an intro and a loop state, in order to do that only specify the startAnimation and loopAnimation

End and loop animation #

Your animation have a finish and a loop state, in order to do that only specify the endAnimation and loopAnimation

Start and end animation #

Your animation have an intro and a finish that should stay on the last frame, in order to do that only startAnimation and endAnimation

Start, end and loop animation #

Your animation have an intro, a finish and a loop state, in order to do that specify the startAnimation, endAnimation and loopAnimation

[2.1.0] - 17/10/2019.

  • add boxFit field

[2.0.3] - 17/10/2019.

  • fix callback not called when using boolean flag instead of callback
  • upgrade flare deps

[2.0.2] - 09/07/2019.

  • upgrade flare deps to be compatible with last flutter stable

[2.0.1] - 29/06/2019.

  • fix callbacks when only loop animation set

[2.0.0] - 31/05/2019.

  • remove onFinished callback to replace it by onSuccess and onError

[1.0.0+5] - 06/04/2019.

  • fix startAnimation doesn't trigger callback.

[1.0.0+4] - 18/04/2019.

  • fix flare controller.

[1.0.0+3] - 18/04/2019.

  • bump flare.

[1.0.0+2] - 26/03/2019.

  • Fix callback triggered before start animation is finished.

[1.0.0+1] - 26/03/2019.

  • Fix crash for start only animation.

[1.0.0] - 26/03/2019.

  • initial release.

example/README.md

example #


FlareLoading(
    name: 'loading.flr',
    loopAnimation: 'Loading',
    endAnimation: 'Complete',
    isLoading: _isLoading,//boolean based loading
    onFinished: () {
      print('Finished');
    },
),

FlareLoading(
    name: 'loading.flr',
    loopAnimation: 'Loading',
    endAnimation: 'Complete',
    until: () => Future.delayed(Duration(seconds: 5)),//Future based loading
    onFinished: () {
      print('Finished');
    },
),

Use this package as a library

1. Depend on it

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


dependencies:
  flare_loading: ^2.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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_loading/flare_loading.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
78
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
89
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flare_flutter ^1.6.2 1.6.2
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
flare_dart 2.2.2
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test