Google manipulates Flutter and Dart cross-platform to improve performance and tooling • The Register

0

Google updated Flutter and Dart, Chocolate Factory’s cross-platform application framework and its associated programming language, on Wednesday, bringing performance and tool improvements to developers.

Neither version, Flutter 2.5 and Dart 2.14.1, makes major changes like stable support for desktop Flutter apps – which is still in beta. Instead, they address underlying issues like reduced interface jerk – small rendering delays that make animations and interactions slow and spotty.

For example, Flutter 2.5 adds shader precompilation support for Apple’s Metal 3D graphics API, which improves graphics performance on iOS and macOS by allowing shaders to load faster.

“We continue to make progress in reducing iOS janks and this is another step on that path,” Chris Sells, Google Product Manager for Flutter, explained in a blog post.

Other sources of jank were also discussed. Processing of graphic images has taken priority over processing other asynchronous events so that animations are not interrupted by network or file system activity. And Flutter’s overly polite advice to the Dart VM to reclaim memory through garbage collection has been made more difficult to ignore, helping to avoid low memory situations on devices with limited resources.

The Flutter team also improved communication latency between Dart and Objective-C / Swift (iOS) and between Dart and Java / Kotlin (Android) by up to 50%.

Flutter 2.5 allows applications built on Apple Silicon M1 Macs to run natively on ARM iOS simulators, without Apple’s Rosetta layer translating between x86 and ARM64 instruction sets. This is primarily of interest to developers who can use the iOS simulator when coding their Flutter apps – it will work best on Apple Silicon hardware. Desktop versions of Flutter apps on macOS do not yet support ARM64.

Compatibility with various Android fullscreen modes has been improved, as has support for Google’s Material You design specification. The camera plugin has also been renovated.

Beyond that, the new version of Flutter improves the performance of DevTools, improves the Widget Inspector, and generally improves interactions with code editors such as Microsoft Visual Studio Code, Java IntelliJ code, and Android Studio.

Dart not quite 180

Dart 2.14.1 added Apple Silicon M1 hardware support to its stable channel. When these changes are fully integrated into Flutter, versions of the Flutter desktop app will run native ARM64 code on macOS with Apple M1 hardware, as mobile versions already do on iOS devices.

The latest version of the language also revises the lint rules available to developers – linters are static code analysis tools commonly used to verify code formatting and styling. The new rules are meant to replace the “pedantic” lint rules that evolved from Google’s internal Dart style guide that Flutter never used.

There is also now support for a .pubignore file, which allows developers to list files they don’t want to download when publishing a package to the pub.dev public repository, and smarter package testing, so small changes don’t invalidate build tests.

Dart version 2.14.1 has some additional programming language features, such as the triple shift operator (>>>).

“This is similar to the existing shift operator (>>), but where >> performs an arithmetic shift, >>> performs a logical, or unsigned shift, where zero bits are shifted into the most significant bit, whether the number being shifted is positive or negative, ”says Michael Thomsen, senior product manager at Google, in a blog post.

Additionally, a restriction on type arguments, which prevented generic function types as a type argument, has been removed, and various core Dart packages and libraries have been changed with additional methods and other improvements. code.

Finally, there are several breaking changes. These include: # 46545: removed support for ECMAScript5, meaning there is no longer support for older browsers like Internet Explorer 11; # 46100: Abandon stagehand, dartfmt, and dart2native, due to the merging of these three separate Command Line Interface (CLI) tools into a single Dart CLI; and # 45451: Deprecation of native VM extensions, which have been replaced by Dart FFI (foreign function interface).

Flutter continues to make inroads among developers. As of May, according to Google, there were over 200,000 Flutter apps on Google Play. The framework is used by companies like eBay Motors, WeChat, and ByteDance. In Stack Overflow’s 2021 Developer Survey, 13.55% of developers asked about the frameworks they use and want to use, Flutter cited, compared with 14.15% who mentioned React, the framework for most popular user interface listed. And Dart was listed as the 7th most popular programming language among respondents. ®

Share.

Leave A Reply