Comments (6)
Alright I put together a simple example here:
https://github.com/luigi-rosso/sequenced_loader
Controller and widget code are coupled together as it was pretty self contained, might be nice to split them up if you want to support other flare files/layouts/etc.
https://github.com/luigi-rosso/sequenced_loader/blob/master/lib/flare_progress_indicator.dart
Flare file is here:
https://www.2dimensions.com/a/castor/files/flare/sequencedloader
from flare-flutter.
FlareActor has a FlareCompletedCallback, But this is only valid in non-loop animations.
just like
new FlareActor(
"xxx.flr",
fit: BoxFit.scaleDown,
animation: animation,
callback: (name) {
if (name == "animation_one") {
...
} else if (name == "animation_two") {
...
} else if (name == "animation_three") {
...
}
},
)
But i don't kown how to use FlareController,I hope the official has a simpler example than bear animation
from flare-flutter.
We can definitely introduce a callback for the loop, but yes the FlareController might be a better way to go for now. There are a few examples of FlareControllers in the example folder here (the penguin uses it and so does the space_reload).
Have you tried simply swapping to your "finish animation" regardless of where the "idle" animation is? This should work as we have a 0.2 second mix value currently hardcoded into FlareActor. That means it'll smoothly interpolate the two animations.
In the meantime I'll cook up a sample controller, just need to finish a few things but I should be able to get it to you later tonight.
from flare-flutter.
Thank you very much, I really like flare ^_^
from flare-flutter.
Works really nicely @luigi-rosso ! Thanks a lot ! I'll integrate this into flare_spalsh_screen :) it will help me understand better FlareController as for now it's still obscur to me ^^
from flare-flutter.
flare_splash_screen has been updated to use this ! I also customize it a bit to be able to do intro, loop, complete animation with all animation optional to be able to mix whatever combination we need/want.
I was thinking ok it's great for a splash screen but it can be use for all sort of loading widget in fact ! So I created flare_loading https://github.com/jaumard/flare_loading that offer the same capabilities but that you can use for all kind of loading process.
Thanks a lot for the help @luigi-rosso !
from flare-flutter.
Related Issues (20)
- Migrate to null safety HOT 8
- Add debug mode HOT 1
- Migration to Null-Safety HOT 3
- Request for Clarification: Flare-Flutter vs Rive Flutter Runtime Use Cases HOT 4
- LateInitializationError HOT 8
- Null Safety for flare_dart HOT 3
- Placeholder widget while animation is loading
- 3.0.0 antialiasing no longer working HOT 13
- IK Constraints not working HOT 4
- Difference between flare-flutter and rive-flutter HOT 4
- FlutterActorImage not visible FlareActor
- Clear Memory after finish an animation HOT 2
- Can't load FlareActor.bundle on Android HOT 2
- Unhandled Exception: Exception: LateInitializationError: Field '_paint@235459774' has not been initialized HOT 2
- LateInitializationError: Field '_paint@xxxxxx' has not been initialized HOT 2
- LateInitializationError: Field '_setupAABB@43245341' has not been initialized HOT 1
- Flutter 2.10 & 3.0 throw warnings during compilation HOT 3
- Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null. HOT 4
- update HOT 1
- Flutter3 Error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flare-flutter.