Skip to content

fzyzcjy/flutter_smooth

Folders and files

NameName
Last commit message
Last commit date
Feb 27, 2023
Nov 24, 2022
Nov 23, 2022
Nov 9, 2022
Feb 18, 2025
Oct 30, 2022
Oct 13, 2022
Oct 15, 2022
Oct 11, 2022
Oct 11, 2022
Oct 11, 2022
Sep 27, 2022
Nov 6, 2022
Oct 11, 2022

Repository files navigation

logo

Achieve ~60 FPS, no matter how heavy the tree is to build/layout.

🎼 3-second video

output_small.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.)

πŸ“š 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)

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 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, or conversations here.

Contributors

All Contributors

Thanks goes to these wonderful people (emoji key following all-contributors specification):

fzyzcjy
fzyzcjy

πŸ’» πŸ“– πŸ€”
Ian Hickson
Ian Hickson

πŸ€”
Dan Field
Dan Field

πŸ€”
Jonah Williams
Jonah Williams

πŸ€”
gaaclarke
gaaclarke

πŸ€”
Nayuta403
Nayuta403

πŸ“–
pajlada
pajlada

πŸ“–

More specifically, thanks for all these contributions:

  • @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 (Flutter team): Provide a canonical janky case inside Flutter framework to help prototyping. Point out slowness of sync generators which avoids detouring.
  • @jonahwilliams (Flutter team): Elaborate shortcomings of the old gesture system proposal (later I made a much more natural one).
  • @gaaclarke (Flutter team): Share his pet theory that slowness is caused by memory locality, indicating another potential application of the package.
  • @Nayuta403: Fix link.
  • @pajlada: Fix typo.

About

Achieve ~60 FPS, no matter how heavy the tree is to build/layout

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published