Achieve ~60 FPS, no matter how heavy the tree is to build/layout
MIT License
https://user-images.githubusercontent.com/5236035/196152010-09a2d829-c94c-48b4-80ed-0633430329ec.mp4
(left = without smooth, right = smooth; captured by external camera to maximally demonstrate end-user perception. High-resolution video here. Deliberately made it super janky for clear demonstration.)
No matter how heavy the tree is to build/layout, it will run at (roughly) full FPS, feel smooth, has zero uncomfortable janks, with negligible overhead. (Detailed reports here)
Two possibilities:
Drop-in replacements: For common scenarios, add 6 characters ("Smooth") - ListView
becomes SmoothListView
, MaterialPageRoute
becomes SmoothMaterialPageRoute
.
Arbitrarily flexible builder: For complex cases, use SmoothBuilder(builder: ...)
and put whatever you want to be smooth inside the builder
.
The documentation - https://fzyzcjy.github.io/flutter_smooth/, with usage, demo, benchmark, insights, and more.
Note Feel free to create an issue if you have any questions/problems. I usually reply quickly within minutes if not hours, except for sleeping :)
Now I am working on pull requests to Flutter framework and engine (i.e. not directly modifying code in this repository), such that you can use this package with standard stable Flutter. An auto-generated list of PRs can be seen here, or conversations here.
Thanks goes to these wonderful people (emoji key following all-contributors specification):
More specifically, thanks for all these contributions: