flare_loading 1.0.0+4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new65

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

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

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

[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: ^1.0.0+4

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_loading/flare_loading.dart';
  
Version Uploaded Documentation Archive
1.0.0+4 Apr 18, 2019 Go to the documentation of flare_loading 1.0.0+4 Download flare_loading 1.0.0+4 archive
1.0.0+3 Apr 18, 2019 Go to the documentation of flare_loading 1.0.0+3 Download flare_loading 1.0.0+3 archive
1.0.0+2 Mar 26, 2019 Go to the documentation of flare_loading 1.0.0+2 Download flare_loading 1.0.0+2 archive
1.0.0+1 Mar 26, 2019 Go to the documentation of flare_loading 1.0.0+1 Download flare_loading 1.0.0+1 archive
1.0.0 Mar 26, 2019 Go to the documentation of flare_loading 1.0.0 Download flare_loading 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
30
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]
65
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/flare_loading.dart.

Run flutter format to format lib/flare_loading.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flare_flutter ^1.3.12 1.3.12
flutter 0.0.0
Transitive dependencies
collection 1.14.11
flare_dart 1.3.6
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