preface

Just on Tuesday (16 November), Google’s Developer Conference released a series of technical talks about Flutter. This weekend, we took time to put together a list of topics related to Flutter so that you can quickly browse through them and find ones that interest you.

Build adaptive cross-platform applications using FlutterClick on the watch

Flutter is now not only a mobile development framework, but also one that shines on the Web and desktop, and when we use only one set of code for multiple applications, we are bound to run into problems. In this Talk, Flutter product Manager Kevin Moore shares how to make the platform adaptive. It is mainly divided into three aspects:

  1. Adapt to external specifications and dimensions
  2. Suitable for different platform input methods, such as mouse, keyboard and touch screen
  3. Follow the style and specification of different platforms, so that users get familiar with the use of habits

You can find more information in this official document.

Deferred Components of FlutterClick on the watch

This Talk focuses on the ability to reduce the volume of a Flutter package using a delay loading component. Google Play launched AAB (Android App Bundle) a long time ago. By splitting the components, users can install applications first without downloading all the code, and then download the components as needed to provide corresponding services, which can reduce considerable package volume during installation. This feature is only available on the Play Store). This is also supported by the Deferred Components capability of Flutter.

Dart 2.13 supports the ability to split AOT compilation artifacts, allowing compiled code and resources to be downloaded at Runtime and then loaded. “The Deferred Components contain split Dart AOT code, as well as resource files.”

Deferred Components can take advantage of Android’s dynamic loading capabilities for apps on the PlayStore, while other app stores don’t support this capability. You can also implement this feature yourself via the Deferred Components API, which means domestic apps could theoretically do it as well. However, there are limitations to this capability, as only Android can support lazy-loading components.

If you also have a strong desire for package size reduction, you can try optimizing in this way. Check out the official documentation for more details.

Using lazy loading to improve Flutter application performanceClick on the watch

Flutter uses a lazy-loading strategy on many scrollable widgets, such as the common ListView.builder, to improve the smoothness of the application in this scenario. Justin, a Flutter engineer, shares in this Talk how Flutter uses the lazy loading strategy, what problems we run into if we don’t turn it on, and the limitations of this ability.

Why use “air Safety” feature |Click on the watch

Null-safety is a capability that improves Runtime null-checking to compile time. With null-safety enabled, types in our code are non-null by default, meaning that they cannot be null unless you declare them null-able. This allows us to write more robust code, and Dart recently officially enabled null safety in version 2.12. In this Talk, Dart software engineer Bob shares why we need to use space security, and how Dart’s static analyzer extrapolates.

Air security is a powerful feature that is already supported in many modern programming languages (Kotlin, Swift, for example), and every Dart developer should be aware of this capability. You are recommended to read this official document.