rive_loading_plus 0.1.3
rive_loading_plus: ^0.1.3 copied to clipboard
Loading widget based on a custom Rive animation, allow you to create beautiful custom loading widgets or dialogs. Fork of rive_loading with modern Rive support.
rive_loading_plus #
Loading widget based on a Rive animation, allow you to create custom loading widgets or dialogs.
This is a fork of the original rive_loading package, updated to support the latest Rive runtime (0.14.x) and Dart 3.
Requirements #
- Dart SDK:
>=3.0.0 <4.0.0 - Flutter:
>=3.0.0 - Rive:
^0.14.x
Installation #
dependencies:
rive_loading_plus: ^0.1.3
Migration from rive_loading #
This package is a fork of rive_loading with modern Rive support. To migrate:
- Replace
rive_loadingwithrive_loading_plusin yourpubspec.yaml - Update imports from
package:rive_loading/rive_loading.darttopackage:rive_loading_plus/rive_loading_plus.dart
The public API remains unchanged - no code changes needed beyond the import.
Usage #
RiveLoading(
name: 'animation.riv',
startAnimation: 'intro',
loopAnimation: 'circle',
endAnimation: 'end',
);
name: path and name of the Rive 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 Rive animation, by default it take the all place available
width: force the width of the Rive animation, by default it take the all place available
alignment: alignment of the Rive 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