Flutter tips and tricks
summary
Avoid async code in main; move startup into a Future (e.g. loadApp) and provide multiple entry points like main_prod to handle startup errors and restore or clear state. Use deferFirstFrame / allowFirstFrame to keep the native splash and prevent flicker while precaching assets. Don’t call async work during build — lift streams out (or use a stream_create_builder) so StreamBuilder gets a stable stream. Prefer mediaQuery.sizeOf / inherited model to reduce rebuilds, use AspectRatio instead of LayoutBuilder when possible, and use IntrinsicWidth for equal buttons.
AI-written summary · about
chapters (9)
- 0:00Introduction and speaker intro
- 1:11App startup optimization
- 8:31Builders and build side effects
- 18:21Stream and FutureBuilder tips
- 22:53Widget layout best practices
- 28:29Caching and debugging techniques
- 31:40Accessibility and UI fixes
- 39:40Common widgets and optimizations
- 40:41Q&A and closing
related talks
32mLightning Talks Part 3
56mDirty Little Tricks From The Dark Corners Of Front-End
01h 07mLightning talks
01h 00mFlip Switch: Live Code Session - Supercharged
01h 02mKeynote. New Adventures in Front-End, Season 2
30mLighting Talks: Sharpen Your HTML5 Saw
51mSymphony of the Web
25mBaseline Magic: The Art of Intent-Driven CSS
