Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fzyzcjy/flutter_smooth
Achieve ~60 FPS, no matter how heavy the tree is to build/layout
https://github.com/fzyzcjy/flutter_smooth
dart flutter fps smooth
Last synced: 27 days ago
JSON representation
Achieve ~60 FPS, no matter how heavy the tree is to build/layout
- Host: GitHub
- URL: https://github.com/fzyzcjy/flutter_smooth
- Owner: fzyzcjy
- License: mit
- Created: 2022-09-27T05:56:45.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T01:50:43.000Z (about 2 months ago)
- Last Synced: 2024-10-04T03:46:31.054Z (about 1 month ago)
- Topics: dart, flutter, fps, smooth
- Language: Dart
- Homepage: https://fzyzcjy.github.io/flutter_smooth/
- Size: 8.78 MB
- Stars: 1,521
- Watchers: 21
- Forks: 65
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# [flutter_smooth](https://github.com/fzyzcjy/flutter_smooth/tree/master)
![logo](https://raw.githubusercontent.com/fzyzcjy/flutter_smooth_blob/master/meta/logo.svg)
Achieve ~60 FPS, no matter how heavy the tree is to build/layout.
## 🎼 3-second video
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](https://fzyzcjy.github.io/flutter_smooth). Deliberately made it super janky for clear demonstration.)
## 📚 1-minute explanation
### Purpose
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](https://fzyzcjy.github.io/flutter_smooth/benchmark))
### Usage
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`.
## 🚀 What's next
The documentation - https://fzyzcjy.github.io/flutter_smooth/, with usage, demo, benchmark, insights, and more.
> **Note**
> Feel free to create an [issue](https://github.com/fzyzcjy/flutter_smooth/issues) if you have any questions/problems. I usually reply quickly within minutes if not hours, except for sleeping :)## 💠Current status
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](https://cjycode.com/flutter_smooth/insight/status), or conversations [here](https://cjycode.com/flutter_smooth/insight/conversation/).
## Contributors
[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-)
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key) following [all-contributors](https://github.com/all-contributors/all-contributors) specification):
fzyzcjy
💻 📖 🤔
Ian Hickson
🤔
Dan Field
🤔
Jonah Williams
🤔
gaaclarke
🤔
Nayuta403
📖
pajlada
📖
More specifically, thanks for all these contributions:
* [@Hixie](https://github.com/Hixie) (Flutter team): Consider details of my several proposals to the Flutter framework/engine such as requiring zero-overhead principle. Construct concrete cases when the initial proposal becomes fragile.
* [@dnfield](https://github.com/dnfield) (Flutter team): Provide a canonical janky case inside Flutter framework to help prototyping. Point out slowness of sync generators which avoids detouring.
* [@jonahwilliams](https://github.com/jonahwilliams) (Flutter team): Elaborate shortcomings of the old gesture system proposal (later I made a much more natural one).
* [@gaaclarke](https://github.com/gaaclarke) (Flutter team): Share his pet theory that slowness is caused by memory locality, indicating another potential application of the package.
* [@Nayuta403](https://github.com/Nayuta403): Fix link.
* [@pajlada](https://github.com/pajlada): Fix typo.