‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌   ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ 

Issue 02 (09/09/2021)

Open the newsletter in your browser


New stable release!

Exceptionally, a special edition of the newsletter is now available to announce the dual release of Flutter 2.5.0 and Dart 2.14.

This edition will focus on the main new features, before going into more detail in Monday morning's edition #03.

Enjoy your reading and get your flutter upgrade!
Image titre

As with every new version, Google has given some figures, always very impressive ones indeed. Among others:

  • 4,600 issues were closed on GitHub
  • 3,932 Pull Requests have been integrated into Flutter code
  • 100% of the 250 most used packages are null safety compatible
Image titre

Before looking in detail at the new framework features, let's look at Dart. As with the previous iteration, changes are fairly small (at least not requiring a migration such as null-safety). However, on the "disappointment" side, there is no mention of the long-awaited static meta-programming.

Image titre

The operator >> is now used to perform an arithmetic shift. Its variation with not two, but three chevrons >>> performs an unsigned logical shift.

Image titre

The rules used by the analyzer will be more consistent, as Google internally, the Dart team and the Flutter team had failed to tune up. From now on, the elements will be clearer, with two packages lints flag_fr and flutter_lints flag_fr.

To apply these new rules, you just have to modify the analysis_options.yaml file.

You have a "pure" Dart project, have you? Use either package:lints/core.yaml (which is also used on Pub.dev), or package:lints/recommended.yaml (the equivalent of core and a few extra rules).

If on the other hand you have a Flutter project, it's quite easy to use the dedicated version: package:flutter_lints/flutter.yaml. Note: you can use them even without Dart 2.14.

Image titre

Today, when you publish on Pub, the whole tree is put online (except the files/directories listed on .gitignore). But the use of .gitignore isn't necessarily appropriate, as some files may be required on Git, but not on Pub.

Now just like the .gitignore file, we will be able to write a .pubignore. And great news: the format of this file is identical to that of the .gitignore.

Image titre

A title that we often use in our changelogs, but on the Flutter side, it's not hype. When it comes to performance, iOS – and its often criticized animations at launch – are obviously at issue. According to the official article, improvements have again been made in this area, but others still remain to be made.

More "tangible" this time, Flutter will now favor the user interface and reduce the priority around asynchronous events (e.g. a network request, access to the file system…). This is very good news, as there is nothing to change in our codes.

On the memory side, Dart has a Garbage Collector to make things easier for us. However, there have been times when simple images generated a large number of GC calls. The example cited is a GIF, where the number of GC passes has been reduced from over 400 to just 4. This will result in a much smoother user interface.

Optimizations have also been delivered on the Platform Channel, the way to communicate your Dart/Flutter code to the underlying platforms (Android and iOS). Want to know more? An article has been dedicated to the subject flag_fr. There too, nothing to change on your side.

Image titre

On Android applications, you have the possibility to indicate whether you want to see the status bar (at the top of the screen), the navigation bar (if available and at the bottom), or neither. Now, by calling SystemChrome.setEnabledSystemUIMode, you can easily manage them dynamically and even be notified of changes with SystemChrome.setSystemUIChangeCallback.

Image titre

The third iteration of Material Design is still not in stable release, but its implementation on the Flutter side has progressed well (FloatingActionButton…).

In parallel, the ScaffoldMessenger, which was mainly used to display Snackbars (at the bottom of the screen), will also be able to display MaterialBanner: fixed messages at the top of the screen.

Image titre

The Flutter team continues to improve support for physical keyboards. This release is mainly about shortcuts. It is now possible to change the default shortcuts via the Shortcuts Widget or to have a list of shortcuts already implemented per platform.

Image titre

Be careful, the classic command will always give you the good old counter. If you want to have the new template named sketelon, you need to type the command flutter create -t skeleton.

In concrete terms, this is a mini-application consisting of a list and a details screen. In addition to the Widgets, this template benefits from a translation and an architecture based on ChangeNotifier.

Image titre

You bet, a Flutter tool does have a French name 🇫🇷! Concretely, when you want to use Platform Channels, the steps of sending and receiving messages (or rather of serializing/deserializing) are done by hand… and can be a real source of errors.
pigeon flag_fr idea is to make this argument passage type-safe, to avoid potential bugs. Feel free to read the article explaining how to use it.

Image titre

Support for Mac ARM processors continues (but is not completely over). In Flutter 2.5.0, if you are developing with the iOS simulator, Rosetta is no longer used, so you get 100% performance.

Image titre

As a reminder, to download this version, you just have to launch : flutter pub global deactivate devtools, then flutter pub global activate devtools.

On the Widget Inspector side, you will notice the appearance of icons to better distinguish each type of Widget, a console with an evaluator 🙌 or the possibility to see the properties by passing your mouse over them.

On the CPU Profiler, you can filter the native code, the code from the Dart libraries and those from Flutter. You will also notice that different colors are used, an improvement also valid for the other tabs.

On the Network part, you can now see the content of requests for those sent in POST.

Image titre

The idea of this "special" edition was to summarize the main announcements. But I invite you to read the different announcement articles on Medium:

Your opinion on this issue