May 19

It’s time again for a Flutter stable release and they are incredibly proud to announce Flutter 3! Only three months ago, they announced Flutter support for Windows. Now they have announced that Flutter will be stable for macOS and Linux, in addition to Windows!

It is said that Flutter has merged 5248 pull requests! They have announced several things as part of this release, including the update on Flutter’s support for macOS and Linux, significant performance improvements, mobile and web updates — and much more! In addition, they have announced about the reduction in support for older versions of Windows, and a short list of breaking changes. In today’s discussion we will deep dive into the latest Flutter release. So, let’s get down to business!

Flutter 3 brought joy to desktop platforms

With the release of Flutter 3, the labor of adding platforms is complete as developers on the stable channel can now build apps for macOS as well as Linux devices and expect first-class support. For Linux, this effort has been assisted by Canonical, developers of Ubuntu, who have been using Flutter to create core experiences within Ubuntu, including parts of the setup flow. Meanwhile, part of supporting macOS is that both Flutter and the underlying Dart programming language now have native support for Apple Silicon. Better yet, you can ship Flutter apps in the Universal Binary format, allowing them to run effectively on both Apple Silicon and Intel based Macs. This Apple Silicon support also extends to developers, with the Flutter and Dart SDKs both now ready to run on the latest generations of Mac Linux and macOS have reached stable and these following features have been included:

macOS system menu bar

You can now create platform-rendered menu bars on macOS using the PlatformMenuBar widget, which supports insertion of platform-only menus, and control over what appears in the macOS application menus.

Full support for international text input

International text input, including for languages that make use of text input method editors (IMEs) such as Chinese, Japanese, and Korean is fully-supported on all three desktop platforms, including third-party input methods such as Sogou and Google Japanese Input.

Accessibility

Flutter has included new accessibility services. Windows, macOS, and Linux all of them support this accessibility services such as screen-readers, accessible navigation, and inverted colors.

Universal binaries by default on macOS

As of Flutter 3, Flutter macOS desktop apps are built as universal binaries, with native support for both existing Intel-based Macs and Apple’s latest Apple Silicon devices.

Deprecating Windows 7/8 for development

With this release, they have been raising the recommended Windows version for development to Windows 10. While they aren’t blocking development on older versions (Windows 7, Windows 8, Windows 8.1), these versions are no longer supported by Microsoft and they will provide limited testing on these releases. But while they promised to offer ‘best effort’ support for older versions, they encouraged us to upgrade.

Mobile updates

Udates to mobile platforms includes the following:

Foldable phone support

The Flutter 3 release supports foldable mobile devices. In a collaboration spearheaded by Microsoft, new features and widgets will allow you to create dynamic and delightful experiences on foldable devices.

As part of this work, MediaQuery now contains a list of DisplayFeatures, describing the bounds and states of device elements like hinges, folds, and cutouts. Additionally, the DisplayFeatureSubScreen widget now positions its child widget without overlapping the bounds of DisplayFeatures, and has already been integrated with the framework’s default dialogs and pop-ups, making Flutter aware and responsive to these elements out of the box.

iOS variable refresh rate support

Flutter now supports variable refresh rate on iOS devices with ProMotion displays, including iPhone 13 Pro and iPad Pro. On these devices, Flutter apps can render at refresh rates reaching 120 hz, which were previously limited to 60 hz. This results in a smoother experience during fast animations such as scrolling. See flutter.dev/go/variable-refresh-rate for more details.

Simplified iOS releases

They have added new options to the flutter build ipa command to simplify releasing iOS apps. When you’re ready to distribute to TestFlight or the App Store, run flutter build ipa to build an Xcode archive (.xcarchive file) and an app bundle (.ipa file). You can optionally add –export-method ad-hoc, –export-method development, or –export-method enterprise. Once the app bundle is built, upload it to Apple through the Apple Transport macOS app or on the command line using xcrun altool (run man altool for App Store Connect API key authentication instructions). After uploading, your app is available for release to TestFlight or the App Store. After setting up your initial Xcode project settings, such as display name and app icon, you no longer need to open Xcode to release your app.

Web updates

Updates for web apps include the following:

Image decoding

Flutter web now automatically detects and uses the ImageDecoder API in browsers that support it. As of today, most Chromium-based browsers (Chrome, Edge, Opera, Samsung Browser, and more) have added this API.

The new API decodes images asynchronously off the main thread using the browser’s built-in image codecs. This speeds up image decoding by 2x, and it never blocks the main thread, removing all jank that was previously caused by images.

Web app lifecycles

The new lifecycle API for Flutter web apps gives you the flexibility to control the bootstrap process of your Flutter app from the hosting HTML page, and helps Lighthouse analyze the performance of your app.

Conclusion

Now that Flutter 3 has reached the six major platforms — Android, iOS, Web, Windows, macOS, and Linux — the big question some may have is “what’s next?” For Google, creating support for those platforms was intended to give Flutter a strong foundation to build upon. Now that the foundation has been laid, Google will continue to build upon it in two key avenues: improving developer productivity and expanding what Flutter can do.

Article published on May 19, 2022




Tags: ,

Leave a Reply