flutter.wtf
646 subscribers
53 photos
45 videos
60 links
πŸš€ Leading Flutter development agency. About us: https://flutter.wtf/about.
Download Telegram
#keys #internals #advanced

Keys! What are they good for?

The key parameter can be found on basically every widget constructor, but their use is less common. Keys preserve state when widgets move around in your widget tree. In practice, this means they can be useful to preserve the user’s scroll location or keep state when modifying a collection.
​​#stateful #widgets #advanced

It's how Stateful Widgets work in Flutter.
#isolates #async #advanced

Futures - Isolates - Event Loop

Single Thread, multi-threading, synchronous and asynchronous. This article explains the different code execution modes in Flutter:

πŸ‘‰ Dart is a Single Threaded language
πŸ‘‰ The Dart execution model
πŸ‘‰ MicroTask Queue
πŸ‘‰ Event Queue & Futures
πŸ‘‰ Async methods
πŸ‘‰ Multi-Threading & Isolates
#performance #advanced #bestpractices

Performance best practices

Generally, Flutter applications are performant by default, so you only need to avoid common pitfalls to get excellent performance instead of needing to micro-optimize with complicated profiling tools. These best recommendations will help you write the most performant Flutter app possible:

πŸ‘‰ Controlling build() cost
πŸ‘‰ Apply effects only when needed
πŸ‘‰ Render grids and lists lazily
πŸ‘‰ Build and display frames in 16ms
#performance #bestpractices #advanced

Building performant Flutter widgets

This article is a part of series developed after the Flutter Material team worked on making the Flutter Gallery app more performant on the web. Some pro tips:

πŸ‘‰ Only build when necessary
πŸ‘‰ Only build what is necessary
πŸ‘‰ Check widget build counts