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

Effective BLoC pattern

The article is about 8 golden points that must be followed when working with BLoC:

πŸ‘‰ Every screen has its own BLoC
πŸ‘‰ Every BLoC must have a dispose() method
πŸ‘‰ Don’t use StatelessWidget with BLoC
πŸ‘‰ Override didChangeDependencies() to initialise BLoC
πŸ‘‰ Use RxDart only when dealing with complex logic
πŸ‘‰ Use PublishSubject over BehaviorSubject
πŸ‘‰ Proper use of BLoC Providers
#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