Comments (1)
This is already possible with a custom animation controller.
You can specify a lowerBound
and upperBound
to the AnimationController
or a min
and max
to the repeat
method.
ie for a repeat between frame 0 to 20% of the animation
Lottie.asset(
'assets/LottieLogo1.json',
controller: _controller,
onLoaded: (composition) {
_controller
..duration = composition.duration ~/ 5
..repeat(min: 0.0, max: 0.2, reverse: true);
},
)
You don't specify a start and stop frame but a ratio of the animation (between 0.0 and 1.0).
Clearly the API could be improved or at least documented :-)
Maybe we can simply add some methods to the LottieComposition
class to easily compute the ratio and the duration from a frame index.
from lottie-flutter.
Related Issues (20)
- Change Speed Not On Load
- Animation made through Ae 3D space is not supported
- Animation not displayed correctly HOT 8
- ValueDelegate.gradientColor Unable to continuously refresh HOT 4
- ValueDelegate.position can not change all shapes
- The gradient in my animation made with Adobe after effects doesn't work as expected. HOT 2
- add flutter 3.16 proper support and update dependencies HOT 2
- ValueDelegate.position can not change images
- Using this library will use a lot of GPUs, even if `enableRenderCache` has been used HOT 2
- Valid json with missing frames HOT 1
- Black lines appear when one animation overlaps another one
- how to Cache tgs file . HOT 1
- tgs lottie very slow on android HOT 5
- How should I playsegment? HOT 2
- RenderCache as Raster initializes animation with incorrect state HOT 1
- How to disable the implementation of auto-orient?
- Privacy Manifest file for IOS HOT 2
- Screen Stuck when try to load the lottie in flutter web
- The lottie files downloaded from lottiefiles can not render HOT 34
- lottie.netowkr how to cached?
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 lottie-flutter.