Dart 2.13 and Flutter 2.2: Everything you need to know about the transforming release

Avantika Shergil By Avantika Shergil  |  Jul 22, 2021  |  Flutter App Development Frameworks
Dart & Flutter Everything you need to know about the latest Release

There is much buzz surrounding the Release of DART 2.13 and Flutter 2.2. The latest versions of Google’s programming language, Dart, and its own mobile app development platform Flutter.

Let’s look at a few crucial developments which set these updates apart from their predecessors.

Flutter 2.2- Introduction

Flutter is an open-source UI software development framework to create high-quality and high-performance applications across mobile operating systems such as Android, Windows, iOS, Mac and Google Fuchsia. It is utilized for both native and cross-platform app development. The statistics show that Flutter has grown as the best native app for development in the past few years. The new updates help in sealing the deal for the coming years too.

Google released Flutter 2.2 during an online flutter engagement event on May 19, 2021. A noteworthy upgrade to Flutter brought in some amazing features for developers allowing them to create fast, portable and visually appealing flutter apps. The potential of flutter 2.2 has been unlocked and you will be amazed by the updated advancements it has to offer. Let’s have a look.

Fresh updates of Flutter 2.2

The vision behind the updates seemed to be focused on Flutter developers and their experience while building apps with Flutter rather than the targeted platforms. Flutter has undergone remodeling to open up new opportunities for web application development organizations to speed up their app development process. Starting from web and desktop embedment to the release of Dart 2.13, a client-optimized programming language designed for fast web and mobile apps.

Dart 2.13

Dart 2.13 efficiently uses nullable and non-nullable types saving Flutter app developers from the sudden, unpredictable error crashes. In addition to incremental improvements and bug fixes, the revised Flutter version introduces new type aliases, Google APIs, Docker systems and much more.

Type alias

Type aliases are a contemporary feature in the Dart 2.13 language. It is the second-highest-rated feature in the language issue tracker. Type aliases are used to give a shorter or more descriptive name to a type making the code more maintainable and readable.

It gives a shorter or more descriptive name to a type, making it easier to read as well as maintain code for professional flutter app developers. One can create a new name for any existing type that can be used similarly to the original type.

Dart FFI

Dart 2.13 brings in an interop mechanism for calling C code through new features in Dart FFI. It supports packed structs and structs with inline arrays specifying the element type with a type argument. This makes it easier for the CPU to access as they are laid out in memory so that members fall within address boundaries.

Null Safety Update

One of the major and latest productivity features among the Dart 2.13 releases is the null safety update. This update changed templates such as dart create and flutter create, enabling null safety by default in new packages and apps.

This helps in spotting those stubborn bugs that are often hard to spot. It also encourages package publishers to migrate their shared packages to pub. dev to null safety and keep the entire ecosystem moving.

Flutter Desktop Updates

Flutter 2.2 introduced a brand new beta version for desktop support. Something that was not seen in earlier versions. It allows users to compile source code to a native macOS, Linux, or windows app. The current version of desktop support also extends to plugins helping dedicated flutter developers to install existing ones or creating their own on multiple platforms.

Custom Text Actions

The custom text actions allow Flutter to provide different keystrokes to compare the text editing behavior to the hosting operating system. i.e. Cmd+C on macOS and Ctrl+C on Linux and Windows. It helps in providing a new action for delete and backspace keys, overriding the default left arrow action.

It allows you to do things such as special handling of the Enter key in a text field. i.e. While allowing a new line to be inserted via Ctrl+Enter, you can trigger sending a message in a chat client. It looks like, by the time Flutter desktop gets stable, users won’t be able to differentiate between editing text in any other applications on the hosting operating system or the Flutter application.

Automatic Scrolling

Flutter has retraced the scrollbars in this latest release. Android and iOS both don’t show an actual scrollbar by default. Contrarily, when the content is larger than the container on a desktop app, a scrollbar is automatically shown by adding a scroll bar parent widget. It automatically adds the scrollbar whenever necessary.

There is also an update on scroll bar themes to change how the scrollbar looks or change its default behavior via Scroll behavior.

Mouse Cursor Over Text Spans

The initial Flutter update allowed users to add a mouse cursor over any widget. In most cases, Flutter itself adds these mouse cursors overall its buttons. But it wasn’t possible if you wanted to run text with different text spans and styles because text span was not a widget. Nonetheless, with the latest gesture recognizer, users will automatically get the corresponding mouse cursor. You can also have all wrapping texts along with recognizers. Text Span even supports features such as on Enter, on Exit, and Mouse Cursor.

Payments and Monetization

Flutter has a new ad integration in the latest updates that Google Mobile Ads SDK for Flutter is now open for beta with a brand new plugin that will now support a wide variety of ad formats. This includes overlay banner, inline banner, interstitial, rewarded and native ads. Along with providing a seamless ads experience and minimal interruption, it helps match the look and feel of your corresponding ad content.

In addition to ads, there are two other ways to monetize mobile apps i.e., you can always charge for your app in the app store and allow your user to buy features or extra content such as game currency via in-app purchases. Now, Flutter has a plugin for that too on pub.dev.

Supports Deferred Component for Android

Flutter 2.2 brings in AOT compilation feature using Dart split, allowing Flutter applications to download various modules containing assets at runtime and ahead-of-time compiled code. These installable splits are called deferred components.

The initial install size can be reduced significantly by deferring the assets and downloading code only when required. Studies show a 46% decrease in initial install size with implementing a version of Flutter gallery.

The Resolved First-jank Issue for iOS

There was a sudden rise of one of the worst frame times and in user reports of jank when the metal backend was enabled by default on iOS in regards to Apple discommending OpenGL. Until now, the only ideal way to avoid jank on iOS was to simplify animations and scenes. But, Flutter 2.2 provides the ability to cache shaders during a training run that can be further bundled and packaged with an app.

The precompiled shaders can also be compiled during a frame workload and even before the first frame while the flutter engine is starting. The precompiled shaders won’t cause jank as they don’t have to be compiled during a frame workload.

Windows UWP Apps

Windows UWP app support is a huge update for desktop lovers. Windows UWP alpha has shifted beyond the stable 2.2 version to alpha in the dev channel with the new updates. It now allows taking your Flutter apps to Xbox and other standard devices where Windows apps won’t run.

Due to the UWP’s sandboxed runtime, running windows UWP with Flutter turns out to be a bit complicated. You’ll first need to set up the UWP prerequisites and switch to the dev channel to enable UWP support. It then creates a Flutter app that allows you to build and run your app in a UWP container by including a new Winuwp folder.

Flutter Dev Tools

There are several WebDev tools updated exclusively for the expert Flutter app developers, keeping in mind their needs:

  • IDE plugins for VS code and Android studio
  • Filtering and search added to logging tab
  • Upgraded Firebase plugins
  • Object location tracking
  • Integrated DartPad into writing
  • Custom notes incorporated into memory timeline
  • Low-code app design and building tool called Flutter Flow

Flutter Web Updates

The drastic improvements of flutter 2.2 have improved a lot of things on the web, including loading, enhancements, adaptability, accessibility, etc. Let’s look into those extensive improvements:

Prompt loading mechanism

With a new service worker-loading mechanism, Flutter has fixed double downloading and optimized caching behavior. Skilled Flutter developers can instantly access the manual refresh feature by simply refreshing a page and seeing all their updates upfront.

Web rendering made easy

The new updates in Flutter support web rendering for platforms such as Canva and HTML, enabling users to exclude the challenges faced between mobile apps and websites. This helps in incorporating font features in HTML and using Canva APIs without any alterations or formats.

Enhanced accessibility

Flutter 2.2 includes a semantic node position granting app-accessibility by instantly generating a DOM tree that renders itself to the rendered object. This update managed to bridge the gap between users and their various ways of interaction with a massive collection of accessibility widgets.

Improved adaptability

The adaptability of top Flutter apps on multiple platforms has improved with the new Flutter updates. They introduced tools like Flutter Folio and Flock to run Flutter apps smoothly on mobiles as well as web browsers. A new range of magnificent Flutter UI builder and UI/UX design kits are also made known keeping larger screens in mind.

Here’s the details on the updates for Dart 2.5 and Flutter 1.9 that paved the path and helped to increase the number of app development service providers opting for Flutter. Let’s dive in.

The features included in DART 2.5

ML complete

Google has announced a feature in DART, called ML complete. This feature has got the developers excited as it is a Machine Learning powered code complete feature that allows the developers to code faster. ML complete will help in avoiding frustrating syntax errors in the code, which often leads to delays.

With the increase in the number of API’S, it becomes difficult to sort through the various possible completions in the old alphabetical manner. ML complete will also help the developers in exploring multiple APIs.

Google has trained ML to complete on an expansive body of DART code on GitHub. The Tensorflow lite deep learning framework developed by Google powers ML complete. The ML complete feature will provide a significant impetus to the developers.  Now the developers no longer need to worry about improper spellings while coding.

They can also have a look at the API’s much faster by just typing some symbols.  The ML complete feature will complete the remaining code for them. ML complete is available on all DART enabled editors like Android studio, IntelliJ, and VS Code.

Dart FFI

Earlier calling C code into Dart was a headache. With this update, Google finally decided to fix this problem by including a feature called the Foreign Function Interface (FFI). With the help of the FFI, developers are now able to call c-based frameworks and components into Dart quickly.

According to Michael Thomsen of the DART developer team, the FFI function allows the developers to avail of all the native API’S on the various operating systems where Dart code currently holds the operations. FFI also allows the developers to call the existing cross-platform native libraries, written in C.

Improved constant expressions

DART had constant expressions in its previous versions, but their capabilities were limited. In DART 2.5, Google has expanded the capabilities of constant expressions. In the 2.5 version of DART, developers can define constant expressions in many ways.

Features like the ability to use casts and control flow and collection spread from DART 2.3 have been continued.

Also Read: Dart or JavaScript: A detailed Comparison on who will win the race

The features included in Flutter 1.9

Flutter is a fast-growing mobile application development framework supported by Google. Flutter is written in DART, and it’s version 1.9 was released by Google in the Global developers day conference in China in September 2019.

Here are some of the most notable improvements in Flutter from its previous versions.

Flutter 1.9 supports Mac Catalina and iOS 13

Flutter 1.9 supports the version of iOS, iOS 13. Also, Flutter 1.9 comes with native support for Mac Catalina, including Xcode 11 support.

Flutter 1.9 supports critical features of iOS 13, like a draggable toolbar and support for vibration feedback. The support for dark mode in ios 13 is work in progress. Flutter 1.9 also supports Bitcode, which is a platform-independent intermediate representation of a compiled program used by Apple.

Flutter 1.9 has gone a step further from its predecessors by allowing support for watch OS as well as tvOS by providing Bitcode for app submission.

More widgets with Flutter 1.9

In Flutter 1.9, Google has included the widgets like Colorfiltered and Toggle buttons.  The color filtered widget will be useful for users with colorblindness.

A common code repository

With the Release of Flutter 1.9, Google has combined the code repositories of Flutter web and the central Flutter code repository. Hence now, the developers have a common flutter repository. Developers can access this repository for building mobile as well as web projects.

Toolchain improvements

Developers can write projects in Swift and Kotlin with Flutter 1.9 instead of Objective-C and Java. This is a significant improvement from previous versions of Flutter, as Kotlin is the default language for projects built in the Android studio now. While Swift is a stable language, and hence its dynamic libraries do not require the distribution packages for iOS 12.2 and beyond.

This helps in minimizing the size of Swift based apps. Having lightweight apps proves to be an essential advantage while developing apps.

Flutter 1.9 gives the critical option of reverting to objective-c or Java. If you do not wish to continue with Kotlin or Swift, you can easily revert, thus providing complete flexibility to the programmers. Apart from this, Google is also working on making the error messages in Flutter more comfortable to read.

Polyglot Flutter

In Flutter1.9, Google has gone truly local by providing support for 24 languages. This will help in increasing the reach of Flutter to developers who are not that well conversant with English.

Drawing conclusions- What’s in bag for the future of the iconic framework?

Flutter 2.2 is extending support to other devices beyond the web and conventional mobile devices. Flutter 2.2 fundamentally shifts the goal to app developers thinking about building apps and feasible updates that keep the candles burning.

The latest Flutter 2.2 updates promise enhancements and seamless connections in smart home appliances, TVs, cars and many other devices. With the new updates, flutter 2.2 has definitely piqued curiosity among both developers and businesses.

Google is going all guns blazing to make sure that the app developer community accepts both DART and Flutter. This will usher the entire field of mobile app development and web development into a new era. Google has brought in many great features in Flutter and DART, and with Google solidly backing both its projects, the future looks promising.

Avantika Shergil Avantika Shergil   |  Jul 22, 2021

An enthusiastic Operations Manager at TopDevelopers.co, coordinating and managing the technical and functional areas. She is an adventure lover, passionate traveler, an admirer of nature, who believes that a cup of coffee is the prime source to feel rejuvenated. Researching and writing about technology keeps her boosted and enhances her professional journeying.


Enter your email

Connect Now

    Full Name
    Email Address
    Contact Number
    Your Message
    + 15 = 22