Flutter
Published in

Flutter

What’s new in Flutter 3.7

Material 3 updates, iOS improvements, and much more!

Enhanced Material 3 support

Material 3 support has been greatly enhanced in 3.7 with the migration of the following widgets:

MaterialApp(
theme: ThemeData(
useMaterial3: true,
colorSchemeSeed: Colors.green,
),
// …
);

Menu bars and cascading menus

Flutter can now create menu bars and cascading context menus.

Impeller preview

The team is pleased to announce that the new Impeller rendering engine is ready for preview on iOS on the stable channel. We believe the performance of Impeller will meet or exceed the Skia renderer for most apps, and as for fidelity, Impeller implements all but a small number of rarely used corner cases. We expect to make Impeller the default renderer on iOS in a forthcoming stable release, so please continue to file Impeller feedback on GitHub.

iOS release validation

When you release an iOS app, a checklist of settings to update ensures that your app is ready for submission to the App Store.

DevTools updates

In this release, there are several new tooling features and overall improvements to try out. The DevTools Memory debugging tool has undergone a complete overhaul. There are three new feature tabs, Profile, Trace, and Diff, that support all the previously supported memory debugging features and added more for your debugging ease. New features include the ability to analyze the current memory allocation for your app by class and memory type, investigate what code paths are allocating memory for a set of classes at runtime, and diff memory snapshots to understand memory management between two points in time.

Custom context menus

You can now create custom context menus anywhere in a Flutter app. You can also use them to customize built-in context menus.

CupertinoListSection and CupertinoListTile widgets

Thanks to the efforts of the Github user Campovski, Cupertino has two new widgets, CupertinoListSection and CupertinoListTile, for showing a scrollable list of widgets in the iOS style. They are the Cupertino versions of ListView and ListTile in Material.

Scrolling improvements

Several scrolling updates have arrived with this release: polish and refinement for trackpad interactions, new widgets like Scrollbars and DraggableScrollableSheet, and improved handling for text selection within scrolling contexts.

Internationalization tools and docs

Internationalization support has been completely revamped! We’ve completely rewritten the gen-l10n tool to support:

  • Descriptive syntax errors.
  • Complex messages involving nested/multiple plurals, selects, and placeholders.

Global selection improvements

SelectionArea now supports keyboard selections. You can extend an existing selection with keyboard shortcuts such as shift+right.

Video example of the new global selection improvements

Background isolates

Now Platform Channels can be invoked from any Isolate. Previously, users were only able to invoke Platform Channels from Flutter’s supplied main isolate. This makes working with isolates and host platform code in Plugins or Add-to-app better. For more information, check out Writing custom platform-specific code on flutter.dev, and the in-depth article, Introducing background isolate channels, a free article on Medium.

Text magnifier

The magnifying glass that appears during text selection on Android and iOS now works in Flutter. This is enabled out of the box for all apps with text selection, but if you want to disable or customize it, see the magnifierConfiguration property.

Swift migration for plugins

With Apple focusing on Swift for their own APIs, we wanted to develop references to help Flutter plugin developers migrate or create new plugins with Swift. The quick_actions plugin has been migrated from Objective-C to Swift, and can be used as a demonstration of best practices. If you are interested in helping us migrate 1P plugins, see the Swift migration section of the wiki.

Bitcode deprecation

Starting with Xcode 14, bitcode is no longer required for watchOS and tvOS applications, and the App Store no longer accepts bitcode submissions from Xcode 14. As such, bitcode support has been removed from Flutter.

iOS PlatformView BackdropFilter

We’ve added the ability for native iOS views to be blurred when rendered underneath a blurred Flutter widget, and UiKitView widgets can now be wrapped inside a BackdropFilter.

Memory management

This release introduces a few improvements to memory management that have the collective effect of reducing jank caused by garbage collection pauses, reducing CPU utilization due to allocation velocity and background GC threads, and reducing the memory footprint.

Sunsetting macOS 10.11 through 10.13

As previously announced, Flutter no longer supports macOS versions 10.11 and 10.12. Since that announcement, further analysis revealed that removing support for 10.13 as well would have limited additional impact, and would help the team to greatly simplify the codebase. This means that apps built against stable Flutter SDKs with this release and onward will no longer work on these versions, and the minimum macOS version supported by Flutter increases to 10.14 Mojave.

toImageSync

This release adds the methods Picture.toImageSync and Scene.toImageSync to dart:ui, analogous to the asynchronous methods Picture.toImage, and Scene.toImage.Picture.toImageSync synchronously returns a handle to an Image from a Picture, with the rasterization for the Image taking place asynchronously in the background. The image is then kept as GPU resident when a GPU context is available, meaning that it is faster to draw compared to images produced by toImage. (Images produced by toImage could also be kept GPU resident, but this optimization has not yet been implemented in that scenario.)

  • Quickly snapping off an expensive-to-rasterize picture for reuse across multiple frames.
  • Applying multi-pass filters to a picture.
  • Applying custom shaders.

Custom shader support improvements

This release includes numerous improvements to Flutter’s support for custom fragment shaders. The Flutter SDK now includes a shader compiler that compiles GLSL shaders listed in the pubspec.yaml file to the correct backend-specific format for the target platform. Additionally, custom shaders can now be hot reloaded for a convenient development cycle. Custom shaders are also now supported by both the Skia and Impeller backends on iOS.

Font asset hot reload

Previously, adding new fonts to the pubspec.yaml file required rebuilding the application to see them, unlike other asset types that could be hot reloaded. Now changes to the font manifest, including additions of new fonts, can be hot reloaded into an application.

Reduce animation jank on iOS devices

Thanks to open source contributions from luckysmg, two improvements have reduced animation jank on iOS. In particular, the addition of a dummy CADisplayLink on the main thread during gestures now forces refreshes at the max refresh rate. Also, keyboard animations now set the refresh rate of the CADisplayLink to the same refresh rate used by Flutter engine’s animator. Thanks to these changes, users should notice more consistently smooth animations on 120Hz iOS devices.

Summary

It is an understatement to say that Flutter would not be the amazing experience that it is today without its community of talented and passionate contributors. As we continue this journey together, the Flutter team at Google wants you all to know that we could not do this without you. Thank you!

--

--

Flutter is Google's mobile UI framework for crafting high-quality native interfaces on iOS, Android, web, and desktop. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source. Learn more at https://flutter.dev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kevin Chisholm

Kevin Chisholm is a Technical Program Manager for Dart and Flutter at Google.