Google has unveiled updates to its Flutter cross-platform development tool and the accompanying Dart language including an early preview of the Flutter GPU API, a low-level graphics API for building rendering packages from scratch.
Flutter 3.24 and Dart 3.5 were launched on August 6.
Flutter GPU is a low-level graphics API integrated into the Flutter SDK. It allows developers to define custom raster pipelines and submit draw calls directly to the GPU, making it possible to develop specialized renderers such as 2D Canvas alternatives, 3D scene graphs, or particle systems for performant and immersive experiences without the engine-level bulk typically needed, Google said. Google noted that graphics programming has a steep learning curve, and that most users likely will choose to use a higher-level rendering package rather than build there own. As a result, Google is investing in rendering packages such as Flutter Scene, which leverages the Flutter GPU API and allows importing of animated glTF models and constructing 3D scenes, enabling developers to easily build 3D apps and games in Flutter and Dart. While the Flutter GPU API is in preview, Google recommends developing against Flutter’s main channel when using Flutter GPU.
Flutter and Dart are intended to help developers build performant apps that reach across mobile, web, and desktop platforms from a single code base. Google also announced this week:
Early support for Swift Package Manager is in Flutter, offering access to the Swift package ecosystem.
Platform view and webview support for Flutter macOS apps has been added, allowing for seamless integration of native macOS UI components directly into a Flutter app.
Dart 3.5 features small changes to the core libraries and several minor breaking changes. In one breaking change to the language, the context used by the compiler to perform type inference on the operand of an await expression has been changed to match the behavior of the analyzer.
Improvements have been made to native interoperability in Dart, which supports calling directly from Dart into C, Java, Kotlin, Objective-C, and Swift. Incremental improvements have been made to support passing a pointer from Dart TypedData objects directly to the Foreign Function Interface, avoiding having to first copy the memory from Dart to Native. Also, support has been added for Java exceptions and Kotlin top-level functions.
Support for compiling Dart and Flutter apps to WebAssembly, introduced in Dart 3.4 and Flutter 3.22 in May, is now stable and complete.
Google unveils Flutter GPU API, Dart updates | InfoWorldRead More