Google’s Dart 3 and Flutter 3.10 bring big changes

Dart 3 introduces sound null safety, major new language features, and a Wasm preview, while Flutter 3.10 fleshes out the Material 3 widget toolkit and support for macOS and iOS targets.

butterfly transformation

Google has launched Dart 3, a major update to the programming language, and the accompanying Flutter 3.10 UI toolkit for mobile, web, and desktop applications, with design and macOS/iOS enhancements. In addition to sound null safety and new language features, Dart 3 previews WebAssembly (Wasm) compilation.

Updates to both Dart and Flutter were announced May 10. Installation instructions for Flutter can be found at docs.dev.flutter, and those for the Dart SDK at dart.dev. Dart 3, now available as a stable release, contains three improvements Google describes as major:

  • 100% sound null safety, which avoids runtime errors from nulls, provides for smaller compiled output, and improves performance. Currently 99% of the 1,000 packages on the dev package manager for Dart support null safety.
  • New language features supporting structured data with records, destructuring, and pattern matching, and abstract data types for modern programming.
  • Class modifiers, a “power user” feature enabling package owners to better express the capabilities of APIs.

Dart’s builders have also been working on compiling Dart to the Wasm binary format, with the goals of bringing faster loading in the browser and improved performance to web applications. Dart to Wasm compilation now is being previewed. To compile to Wasm, developers need a browser that supports WasmGC.

Also being worked on is Dart’s interoperability with Java and Kotlin on Android, and with Objective-C and Swift on macOS/iOS—akin to Dart’s existing interop with code compiling to C libraries. Dart once was once perceived as a possible JavaScript rival but moved away from that goal in the middle of the last decade.

Flutter 3.10, meanwhile, brings improved support for the Material 3 widget toolkit, including support for Material 3 algorithmic color scheme generation, along with a number of improvements that make it easier to build macOS and iOS apps. The latter include the addition of spell-checking support in the editable text widget, a new check box widget, and support for wireless debugging. The Impeller renderer, in preview since Flutter 3.7, is now the default renderer on iOS, promising less jank and more consistent performance.

Also featured in Flutter 3.10 is a JNI bridge to Jetpack libraries written in Kotlin, enabling the calling of a new Jetpack library directly from Dart without needing an external plugin.

Google’s overarching goal for Flutter is to provide five core characteristics: beauty, providing control over every pixel on the screen; speed, powered by hardware-accelerated graphics; productivity, with workloads supported by hot reload and dev tools; portability, leveraging a single shared code base for multiple platforms; and universal availability, by being free and open source.

Copyright © 2023 IDG Communications, Inc.