Google updates its UI framework, Flutter and programming language, Dart
: Thu, 09 Sep 2021 21:31:16, by: Deepak Kumar

On Wednesday, Google updated Flutter and Dart. Flutter which is a Google UI toolkit and Dart the associated programming language. The update brought performance and tooling improvements to both.

The two releases, Flutter 2.5 and Dart 2.14.1, however, don't bring big changes like stable support for the desktop Flutter app, which is still in Beta. The updates are targeted more towards smaller under the hood changes, like reduction of interface jank, small rendering delays which made animation and interaction slower and uneven.

Some new additions in Flutter 2.5 would be that it now supports the precompilation of shaders for Apple's Metal 3D graphics API, improving the graphic performance on iOS and macOS, where the shaders can now be loaded faster. This was another step towards reducing iOS junk for flutter, which is something Google has been working towards.

Few other sources of jank were also reduced, the processing of graphics frames has been given priority over processing other asynchronous events. The update was made so that animation doesn’t get interrupted by network or filesystem activity. Flutter’s hints towards Dart VM to reclaim memory via garbage collection now are more evident, which helps avoid low-memory situations on resource-constrained devices.

The Flutter team also improved the latency of communication between Dart and Objective-C/Swift (iOS) and between Dart and Java/Kotlin (Android) by almost 50 per cent.

The new Flutter 2.5 allows you to run apps built on Apple Silicon M1 Macs, natively on ARM iOS simulator, without Apple’s Rosetta layer which would translate between x86 and ARM64 instruction sets. This new development would be interesting for developers who use the iOS simulator when coding on their Flutter apps, which would perform better on Apple Silicon hardware. However, desktop builds of Flutter apps on macOS don’t yet have ARM64 support.

The compatibility of Flutter with various Android full-screen modes has also been worked on for improvement, improvement to support Google’s Material You design specification has also been made. The camera plugin has also been renovated.

Additionally, the release brings positive changes to DevTools performance, enhances the widget inspector, and smoothens interactions with code editors like Microsoft Visual Studio Code, Java code, IntelliJ and Android Studio.

Dart 2.14.1 has also added support for Apple Silicon M1 hardware to its stable channel. These changes when fully integrated into Flutter, then the desktop app build will be able to run native ARM64 code on the macOS with the Apple M1 hardware, which is already possible on iOS devices.

The newest language release revises the lint rules available to developers, linters are static code analysis tools that are commonly used for checking code formatting and styling. The new rules intend on replacing the pedantic lint rulers that evolved from Google’s internal Dart style guide, which was never used by Flutter.

.pubignore files are also now supported. Letting developers list files that they would not want to upload when publishing a package to the public pub.dev repository. Additionally, it supports smarter package testing and now small changes do not invalidate build tests.

The new version of Dart has new programming language features like the new 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 regardless of whether the number being shifted is positive or negative," said the blog post of google introducing the update.

A restriction on type argument, in the previous version which prevented generic function types as a type argument, has been removed in the new version, along with it various core Dart packages and libraries have been modified with additional methods and other code improvements.

Lastly, there are several breaking changes. Including removal of support for ECMAScript5, which means it will not support older browsers like the Internet Explorer 11. Depreciation of stagehand, dartfmt, and dart2native, due to the merger of these three separate command-line interface (CLI) tools into a single Dart CLI and also the Deprecation of VM Native Extensions, which have been replaced by the Dart FFI (foreign function interface).

Flutter over the last few years has been able to carve out its user base amongst developers. In April last year, Google revealed that nearly half a million developers use its open-source UI framework Flutter each month. And additionally 2 million developers have used  Flutter since December of 2018.

The Flutter framework is predominantly used by companies like eBay Motors, WeChat, and ByteDance. However, Google has also become a choice for developers, shows recent Stack Overflow's 2021 Developer Survey. According to the survey 13.55 per cent of developers cited that they either use or want to use Flutter as opposed to 14.15 per cent who said React, which is the most popular UI framework. Dart has also made progress amongst programming languages which is listed as the 7th most beloved programming language by respondents of the survey. 

Check the Flutter App Development Cost in India.

Author: Deepak Kumar

Deepak Kumar is Science Graduate from Delhi University with more than 17 years of experience in Media and Technical field. With a background in Science and Media field, Deepak has been offering services in the media houses. He has worked as director and chief in many companies. During his journalistic career, he has achieved many milestones working in various organisations. As a technical writer, he is of scientific bend of mind and has done many glorious stories in the field during the career.

Address: G-26/128, Sector-3, Rohini Delhi - 110085 India.

Email: deepak@crdb.org

Phone: +91 9313063554