BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Flutter 3.3 Previews New Rendering Engine

Flutter 3.3 Previews New Rendering Engine

With Google's UI framework Flutter, users can build natively-compiled applications for mobile, web, and desktop from one codebase. Google just announced the third Flutter release of 2022, version 3.3, and version 2.18 of Flutter's language Dart. Both releases are refinements without significant new features. A new rendering engine called Impeller is available, but only in preview and only for iOS. Google also launched a new showcase app, Wonderous, built with Flutter 3.3 and using Impeller on iOS.

What's New in Flutter 3.3

Flutter apps do not use UI elements of the underlying platform, but emulate them. Flutter ships with Material UI, which works on all platforms, and an iOS UI element set. Open-source libraries offer Windows, macOS, and Linux UI element sets.

Text selection in Flutter web apps now works as expected – users can select multiple rows of text at once. Trackpad gestures work better in desktop applications. Windows apps now get their version number from the pubspec.yaml build file. And iPad apps can use Scribble with Apple Pencil for handwriting input.

Some Material 3 components improved in this release: IconButton, Chips, and AppBar. Loading images that are included in the app is faster and uses less memory with the new ui.ImmutableBuffer.fromAsset() method. And pointer compression is now disabled on iOS to make more memory available to non-Dart parts of a Flutter app (such as libraries).

The Flutter team's go_router package simplifies routing within an app with URL-based declarations. Version 4.3 supports asynchronous code. The Flutter Visual Studio Code extension and the Flutter DevTools have also improved.

Flutter 3.3 doesn't run on 32-bit iOS devices anymore. That excludes iPhone models 5C (from 2014) and earlier and the 2nd through 4th generation iPad (the latter launched in 2012). The upcoming Q4/2022 Flutter release won't work on macOS 10.11 (from 2015) and 10.12 (from 2016), either.

Apple dropped Bitcode from its upcoming fall iOS and iPadOS versions. That's why Flutter will also remove Bitcode support in a future release.

Flutter has used Skia as its graphic engine since the very beginning. Skia powers Chrome, Firefox, Android, ChromeOS, and more. In contrast, Impeller is custom-built for Flutter and "takes full advantage of modern hardware-accelerated graphics APIs such as Metal on iOS and Vulkan on Android." That enables better animations and removes a common source of "yank" – stuttering animations and transitions.

When announcing the previous release, the Flutter team cited the existence of 500,000 Flutter apps as a success indicator. This time the Flutter team said that "every day, more than 1,000 new mobile apps using Flutter are published to the Apple and Google Play stores". Unfortunately, both numbers lack context, such as how competing platforms perform.

What's New in Dart 2.18

Dart is strongly typed and optimized for UI development. Starting as a "mixture of JavaScript and Java", it now has features neither of these two languages do (such as sound null safety).

Dart introduced sound null safety in March 2021, covering both applications and libraries. That's the same as Swift, but unlike Kotlin, which can't guarantee null safety for libraries. All the top 250 Flutter and Dart libraries migrated to null safety, and only 2% of the top 1,000 libraries have not. More than 80% of all Flutter applications run in July 2022 used sound null safety. That's why Dart plans to stop supporting Dart versions without null safety by mid-2023.

Dart includes a multi-platform HTTP library. It offers experimental support for two platform-specific libraries. The first one is cupertino_http for iOS and macOS. It uses Apple's NSURLSession for features such as WiFi-only networking or VPN access. The second library is cronet_http for Android, building upon the popular Cronet library.

The Dart Foreign Function Interface (FFI) for calling native C APIs can now interact with Objective-C and Swift code on iOS and macOS. Improved type inference detects some cases of non-nullable parameters better. And asynchronous code is a little smaller and runs a little faster.

About the Author

Rate this Article

Adoption
Style

BT