MindInventory
flutter dart

The New Flutter 1.9 Coupled with Dart 2.5 Update Released

  • Google has announced Dart 2.5 update and a new Flutter 1.9.
  • Dart 2.5 will now support calling C code and intelligent code completion.
  • Flutter 1.9 will now support iOS 13, macOS Catalina, and new Material widgets.

At the recent Google Developer Days China, Google simultaneously unveiled the updated Dart 2.5 programming language and along with it, the new Flutter 1.9 that unites Flutter on web and mobile.

Among the top features, robust support for iOS 13 and macOS Catalina by the updated Flutter are most noteworthy. Also worth mentioning is the stronger support for calling C code and intelligent code completion by the new Dart version.

Central to the updates is Machine Learning, which would help developer complete codes and identify the right APIs is to be used.

With the new Flutter 1.9, developers would be able to use the same codebase to come up with applications for web as well as mobile. This is a major milestone in the history of the app development framework’s journey that marks the integration of its web support into the main repository.

Also, with Dart 2.5, developers would now be able to create all varieties of applications for all platforms. This apart, Flutter 1.9 has now been designed for improved tooling support! The latest version will support new Material widgets for toggle and filter functions as well.

What’s New in Dart 2.5?

Dart is a Google-borne programming language implementable to develop mobile, web, desktop and backend apps. It is an object oriented, class defined, garbage collected language with a C-style syntax which it uses to optionally transcompile into JavaScript.

dart 25

The latest Dart 2.5 is a stable release with the following highlights:

1. Support for calling C code right from Dart using Dart FFI Library

Developers who have knowledge about low-level languages would be excited by this announcement. The event also saw the launch of the dart:ffi library, the preview of which allows calling into C code directly from Dart and Flutter.

As a result, any app developed using the programming language and framework would have access to system APIs and libraries written in C for Android NDK and desktop platforms.

Up until now, calling C straight from Dart was possible within the limits of deep integration into the Dart VM with the help of native extensions. However, Google has arrived with a new goal to offer a new mechanism that enables greater performance, better ease of approach and usability across supported platforms and compilers.

With the latest update, Dart-C interop will enable the following two cases:

  • Calling into a system API supported by C on the host OS
  • Calling into a library supported by C that’s either cross-platform for a single OS

The new dart:ffi library is now ready to be tried on a Dart dev channel or Flutter master channel. Expect new changed to be added to that soon.

2. Leveraging Machine Learning for Intelligent Code Completion

The power of Machine Learning is here to help developers write Flutter and Dart apps with more precision. Dart 2.5 brings with it the preview of a code completion system which is ML based.

This new system is powered by TensorFlow Lite and the open source Dart repositories available on GitHub. It works by attempting to suggest relevant options first instead of offering them in alphabetical order.

This is a welcome change keeping in mind the tediousness of endless browsing through the list of possible completions in typed programming languages. TensorFlow Lite trains a member occurrence model by analyzing the heaps of open source Dart code compilations.

Thereafter, this model is used to predict the next symbol as the API continues to grow and the developer types.

The preview is a part of the Dart analyzer, which makes the code completion accessible across all editors that support Dart. These include Android Studio, Visual Studio Code, and IntelliJ, too.

3. Constant Expressions and the Likes of it

Last, but not the least in the Dart realm, the new version now supports a lot more ways to define Constant Expression. Up until now, Dart has been supporting the creation of const variables and values. However, the support for Constant Expression came with limits.

With the new update, there are now newer ways to do the same. This includes ways to implement casts and better control flow and collection spread features.

Google is also prepping for the next release with extension methods that would enable non-nullable references by default and improved support for concurrency. Rich migration tools for existing code is the tech giant’s latest area of interest and investment.

What’s New in Flutter 1.9?

Flutter is an app development framework running in league with competitors like Facebook’s React Native. The latest Flutter release has been dubbed by Google as its biggest update till now with over 1500 PRs and 100 contributors.

flutter 19

As discussed earlier, the new Flutter 1.9 fully supports iOS 13 and macOS Catalina, and arrives with more advanced tooling, better material widget, and exciting Dart-based features.

The release has been timed well with the official launch of iOS 13 and built keeping in mind the latest UI features. Also, Flutter 1.9 has been built for absolute macOS Cataline support including that for Xcode 11.

Here are the highlights:

1. Flutter for Web

As mentioned earlier, Google has fused Flutter web repository with the main repo. In other words, we now have an unified Flutter repository which makes it possible to develop applications for mobile, desktop and web using the same codebase.

Now when developers create a project, the framework would create a web runner using a minimal web/index.html file which bootstraps the web-compiled code.

This very file would enable using either the Flutter CLI tool or the IDE plugins so developers can edit and run Flutter applications on the web. Although this change is still in its infancy, it is nevertheless a great one!

2. Supporting iOS 13 and macOS Catalina

Google wishes to make Flutter complement the Xcode 11 build system. This is why the new Flutter 1.9 is ready for iOS 13 and macOS Catalina.

Google has upped the end-to-end tooling experience to enable 64-bit support across the toolchain and make platform dependencies simpler.

This apart, Flutter 1.9 also supports the draggable toolbar of iOS 13, including the long-press, drag-from-right features along with vibration feedback. Interestingly, iOS 13 dark mode is yet to receive the support, although, per reports, the work has begun.

Furthermore, you can also turn on experimental support for Bitcode – the intermediate representation of a compiled program which is platform-independent.

When you submit your Flutter-borne app as Bitcode, Apple optimizes binaries in the future without the need of resubmission. If we look into the future prospects, Bitcode support suggests Flutter would be ready for platforms like watchOS and tvOS someday.

3. Support for New Material Widgets

Apple aside, Flutter 1.9 also bears the flag for new Material design widgets. Material is a leading open source design system implemented to enable interactive user experiences across platforms. It is comprehensive and flexible to the utmost.

In the new Flutter version, several new widgets have been introduced. For instance, the text and icon widgets have been combined in the ToogleButtons widget to create a set of customizable buttons.

Yet again, recoloring a tree of child widgets is now possible with The ColorFiltered widget, much like recoloring images using various algorithms. This can be helpful in addressing color blindness accessibility issues among users.

4. Improvements in Toolchain

With Flutter 1.9, the new projects would default to Swift instead of Objective-C for iOS projects and Kotlin instead of Java for Android projects for the base code. This dismisses the manual work needed for adding packages written with Swift to an application.

Swift 5 being ABI stable, its dynamic libraries no longer require distribution packages for iOS 12.2 onward, thus minimizing the size of Swift apps. Also, Kotlin is the default language for projects in Android Studio now.

Thus, with an option to revert to Objective-C or Java, these new Toolchain improvements in Flutter 1.9 seem just the right thing. Additionally, Google is also working on improving error messages in Flutter to make them more concise, readable, and actionable.

5. Multiple Language Support

Flutter goes full polyglot with this new release. It has now added support for 24 languages worldwide – something that was totally missing in the previous versions.

These include Albanian, Afrikaans, Amharic, Azerbaijani, Assamese, Bengali, Basque, Belarusian, Burmese, Gujarati, Georgian, Icelandic, Kyrgyz, Kannada, Lao, Malayalam, Macedonian, Nepali, Oriya, Punjabi, Sinhalese, Telugu, Uzbek, and Zulu.

To Conclude…

GDD 2019 saw a lot of eventful changes in Flutter and Dart which the developer fraternity is sure to welcome with arms wide open. These are great times for Flutter enthusiasts as well as those who are contemplating moving toward this application framework.

Powered by Dart 2.5, Flutter 1.9 is now available for upgrade and download. Help yourself to the amazing additions and improvements!

Dhruv Mevada

Dhruv Mevada

Dhruv is Sr. Android Engineer at Mindinventory. He is passionate about Android and has got his hands dirty and feets wet with all things Android. He loves to explore the bleeding edge tech stuff. He is an early adopter and would like to stay up to date regarding latest trends in Industry.

Turn your vision to magnificent reality With
Our Web and Mobile Solutions