flutter.wtf
648 subscribers
53 photos
45 videos
60 links
πŸš€ Leading Flutter development agency. About us: https://flutter.wtf/about.
Download Telegram
#features #news #desktop

Announcing Flutter Windows Alpha

The article is about native Windows app compilation, some early plugins, and a desktop-ready Flutter Gallery app.

Some headlines:

πŸ‘‰ Adding Windows to Flutter
πŸ‘‰ Exploring some sample apps
πŸ‘‰ Getting started with Flutter for Windows
πŸ‘‰ Plugins for Windows
πŸ‘‰ Interop with Windows
πŸ‘‰ Flutter for Windows resources
πŸ‘‰ Flutter for Windows in the wild

With the new support for Windows in Flutter, what are you going to build? πŸ˜‰
#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.
#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
#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
#states #architecture #bloc #video

Flutter State Management - The Grand Tour

This video will help you to take a tour of almost all state management techniques in Flutter. You may watch full lesson or use our timecodes:

πŸ‘‰ StatefulWidget – 1:25
πŸ‘‰ StatefulBuilder – 2:43
πŸ‘‰ InheritedWidget – 4:16
πŸ‘‰ RxDart + BehaviorSubject – 6:12
πŸ‘‰ BLoC – 8:50
πŸ‘‰ Redux – 11:34
πŸ‘‰ Mobx – 11:57
πŸ‘‰ Scoped Model – 12:27
πŸ‘‰ Flutter Hooks – 12:58
πŸ‘‰ Firebase – 13:22
#ui #scaling #screens

Flutter β€” Effectively scale UI according to different screen sizes

Since we have full control on all the pixels in Flutter, we might implement our own UI scaling approach. So, all objects will be scaled based on screen density and size.
#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
#dart #nullsafety #preview

Dart sound null safety: technical preview 2

Null safety is a major new productivity feature that helps you avoid null exceptions, a class of bugs that are often hard to spot. As an added bonus, this feature also enables a range of performance improvements. Dart Team announces a second tech preview of sound null safety, including support for the Flutter framework:

The article is:

πŸ‘‰ Why null safety?
πŸ‘‰ Null safety principles
πŸ‘‰ The null safety roadmap
#plugins #packages

Announcing: Flutter Community Plus Plugins

Flutter Community delighted to introduce their initial release of Plus plugins, with extensive support for most platforms. This builds on the foundation set by the Flutter Team's plugins to enable Flutter developers to build their apps for different platforms out of the box:

Plus Plugins have 3 main goals:

πŸ‘‰ Supporting Federated plugins
πŸ‘‰ Supporting and maintaining all platforms
πŸ‘‰ Updating to plus plugins with minimal effort
#news #flutter2

What’s New in Flutter 2

After more than two years since the Flutter 1.0, Flutter Dev Team is pleased to announce the release of Flutter 2. Shortly, what's new:

πŸ‘‰ Web support has transitioned from beta to the stable
πŸ‘‰ Flutter 2 contains Dart 2.12 with Null Safety
πŸ‘‰ Flutter desktop has moved to Beta (stable channel)
πŸ‘‰ Google Mobile Ads SDK is available for Beta
πŸ‘‰ Flutter has gotten new iOS features
πŸ‘‰ Autocomplete and ScaffoldMessenger widgets
πŸ‘‰ Some improvements in Dart CLI, DevTools, IDEs extensions
#news #flutter2

What’s new in Flutter 2.2

The Flutter 2.2 release focuses on polish and optimization, including iOS performance improvements, Android deferred components, updated service worker for Flutter web and more. The main headlines:

πŸ‘‰ Aliases for types as well as for functions
πŸ‘‰ DevTools now supports the layout explorer for Flutter web
πŸ‘‰ Improvements in page transitions and incremental installs for iOS
πŸ‘‰ Comprehensive guide for building adaptive apps is now available
πŸ‘‰ Lots of desktop related enhancements (cursors, text editing, scrolling)

And last but not least: by now Play Store has more than 200K Flutter apps πŸ₯³
#dart2 #nullsafety

Understanding null safety

Null safety is the largest change in Dart 2.12 (default Dart version since Flutter 2). Now all Flutter Developers have to clearly understand null safety and be able to work with it. That's why Dart team prepared this comprehensive article you need to read.
#adaptive #responsive #desktop #web

Building adaptive apps

One of the first things you must consider when bringing your app to multiple platforms is how to adapt it to the various sizes and shapes of the screens that it will run on.

The article headlines:

πŸ‘‰ Layout widgets
πŸ‘‰ Visual density
πŸ‘‰ Contextual layout
πŸ‘‰ Device segmentation
πŸ‘‰ Single source of truth for styling
πŸ‘‰ Input and keyboard accelerators
πŸ‘‰ Mouse enter, exit, and hover
πŸ‘‰ Common idioms and norms to consider
​​#ffi #integration

Foreign Function Interface πŸ”₯

For C-based APIs, including those that can be generated for code written in modern languages like Rust or Go, Dart provides a direct mechanism for binding to native code using the dart:ffi library.

The foreign function interface (FFI) model can be considerably faster than platform channels, because no serialization is required to pass data. Instead, the Dart runtime provides the ability to allocate memory on the heap that is backed by a Dart object and make calls to statically or dynamically linked libraries. FFI is available for all platforms other than web, where the js pachage serves an equivalent purpose.

To use FFI, you create a typedef for each of the Dart and unmanaged method signatures, and instruct the Dart VM to map between them. As a simple example, here’s a fragment of code to call the traditional Win32 MessageBox() API:
#threading #asynchronous

Exploring Threading In Flutter

Threading in Flutter?! But they say it's single-threaded! Yes and no. Advanced Flutter Developers should know about the Embedder Protocol, that forces all embedders to have 4 threads:

πŸ‘‰ UI Runner
πŸ‘‰ GPU Runner
πŸ‘‰ IO Runner
πŸ‘‰ Platform Runner
#immutable #patterns

Immutable Data Patterns in Dart and Flutter

Immutable data constructs are those that cannot be mutated (altered) after they've been initialized. There are a number of advantages to using immutable data: thread safety, pass safety, project simplicity. But how to implement immutability in Dart?

The article headlines:

πŸ‘‰ Final variables vs. constants
πŸ‘‰ Immutable data in Flutter
πŸ‘‰ Creating your own immutable data classes
πŸ‘‰ Updating immutable data