what's new in Flutter 2.2

On 19th May 2021 at Google I/O, the internet leviathan announced Flutter 2.2, the latest version of the open-source UI toolkit preferred by numerous developers all around the world for building beautiful apps for any device from just one platform. It’s safe to say that Flutter 2.2 is the best version of the framework yet. Read on to learn more about it and what it can do.

Google recently introduced Flutter 2.2 at Google I/O on 19th May 2021. It’s the latest version of the cross-platform framework for app development crafted by the internet giant. It introduced several improvements, such as iOS performance enhancements, Android deferred components, Desktop improvements, Dev tools, Null safety by default, and many others.

There’s much for you to know about the newest updates introduced by Flutter before you hire a flutter developer for your project. Without further ado, this topic will delve directly into Flutter 2.2 and all the new features it brought.

The latest version of Dart

As you know, Dart is the programming language used in combination with Flutter. Version 2.2 brought with it a massive range of enhancements, along with Dart 2.13. It includes multiple noteworthy features worth mentioning, such as type aliases, updates on the null safety feature, Dart FFI, and more.

1. Type alias

If you hire a flutter developer today, and if the specialist uses Flutter 2.2 for your project, he/she can create a new name for any existing time. In doing so, the developer can use this name instead of the existing one. Before the arrival of Dart 2.13, users had to create a type alias for the function. Now, the creators of Flutter extended it to the variable type. The most remarkable thing about type alias is that they can pass the type quality test effectively. Also, it’s now perfectly legal to call the constructor on a type alias that names a class. The benefit of using a type alias is that a developer can simplify reading your code to others.

2. Dart Foreign Function Interface or FFI

Without the FFI mechanism, developers can call the code. In Flutter 2.2, it appears as a new feature in which the developer can wrap the inline array directly in Dart. One more improvement in FFI allows it to support packed structures. It helps to omit padding to reduce the amount of memory consumed.

Dart 2.13 introduced several other changes concerning performance improvement. It also reduces the memory space occupied by the program.

Update on null safety

Update about null safety

Today, if a flutter app development company picks up a project and uses Flutter 2.2 for it, the developers working on it will be able to generate null safety by default. Since the creators mitigated most of the plug-ins to the null safety, it’s possible to transfer a Flutter-based app safely to null safety.

Flutter updates for desktops

updates for desktop usine Flutter

Flutter 2.2 has multiple updates and features for desktop users too.

1. Custom text actions

The creators of Flutter extended its support to many other platforms with different input types, such as touchpads or mouse + keyboard. With this release, developers and every other user can entirely customize the keystrokes concerning text actions. This feature will open the doors to an endless list of possibilities, particularly for the best flutter app development company. For instance, it will now allow a user to send messages with the “Enter” key while inserting a new line by pressing “Ctrl + Enter.”

2. Mouse cursor over text spans

You probably know that TextSpan isn’t a widget per se. Users can also change the mouse cursor while hovering over a clickable widget, but not TextSpan. Of course, with Flutter 2.2, the story is entirely different. TextSpan will be perfectly clickable for a developer when using TestSpan with GestureDetector on Flutter 2.2. In doing so, he/she will get the corresponding mouse cursor. It even supports “onEnter” and “onExit” events.

3. Supporting deferred components for Android

Android developers aren’t new to deferred components, but the creators of Flutter 2.2 introduced it officially with the latest release. There is one problem, however. For now, deferred components support Android only. No support is available for iOS yet. Are you familiar with the concept of a deferred component? It’s just a piece of code a developer can download OnDemand runtime. If you wish to learn more about deferred components, you should visit the official page of the same.

4. Monetization and payment

Flutter 2.2 has a new plug-in with which the providers of flutter app development services can add Google Pay on iOS and Android, and even a new ad format through Google Mobile Ads SDK. Due to the official Pay plug-in from the Google dev team, it’s much easier for developers to implement the payment process on both platforms now. It’s also simpler than before to monetize an application via payments, in-app purchases, and advertisements.

5. Windows UWP apps

UWP stands for Universal Windows Platform. With the transference of Universal Windows Platform apps to alpha in the dev channel, users can run UWP apps on numerous devices where standard Windows applications don’t work, including Xbox. A developer just has to switch to the Dev channel and prepare the prerequisites to enable UWP support in a project. The official website can provide you with more information.

6. Resolving iOS problems

When you open an app created using Flutter for the first time, it may seem a bit messy. If you turn it off and restart it, the app will function normally. This situation is a result of the shader compilation jank. In simple words, the shader is a piece of code that you must compile on the device. This problem has an incomplete solution. The Dev team tried to fix it but couldn’t manage to do it fully.

Dev tools

To the providers of the best flutter app development services, the development tool is as vital as the end product. After all, it helps them build more memory-efficient and error-free mobile apps, and the Flutter team of Google knows it better than most. That’s why they introduced two new memory tracking systems in this release, along with an entirely new tab for the so-called “provider” plug-in.

flutter dev tools

The memory tracking enhancements give a developer the ability to track every object as allocated. It’s an exceptionally helpful tool to pinpoint memory leaks in code. There’s another attractive feature in the dev tool of Flutter. Through this feature, a developer can insert custom messages into the memory timeline. By using it, developers can check whether they’re cleaning things up appropriately or not.

Also, at times, you have to track down in package. Dev tools will come to your rescue in this situation. In the dev tool, the Flutter team added a new extra tab dedicated to the “provider” package. You will automatically notice the new provider tab whenever you use the provider package with the newest version of Flutter.

Web updates

Even after all the improvements described above, there’s more that you should know about. For instance, with this release, Flutter brought forth a few enhancements for the web platform. The creators fixed the double-downloading problem of main.dart.js. Before the release of version 2.2, the service worker had to download the update and to inspect the changes, the user had to refresh the page several times.

Now, with this new service, users simply have to wait before downloading an update. Once the download is complete, the user will get the changes without refreshing the page manually.

Accessibility is also a useful thing. It’s nothing less than an improvement. The Flutter team augmented the semantic node position to bridge the gaps between mobile and desktop web applications when using transforms. It means that the focus box has to appear properly over elements when the developer decorates widgets with transforms.

Finally, Flutter Dev tools support the new layout explorer for Flutter Web Applications.

Final considerations

More than anything else, the purpose of Flutter is to help developers build incredible experiences. These people get animated by the idea that app development can be better than it is today. Their work can empower business owners like you by removing traditional impediments to carving a path to your audience. The Flutter team loves nothing more than to watch developers and users put their work to good use. With a massive variety of presentations, workshops, and on-demand sessions about Flutter at Google I/O, the team wants to share its work with every developer and user out there. Both Flutter 2.2 and Dart 2.13 are available now with updated features.

Let's Share it:

ceo image
Jayanti Katariya

At the core, Moon Technolabs is driven by the vision, sharpness and flourished under the leadership quality led by none other than the founder & CEO i.e, Mr. Jayanti Katariya. His simple-approach & never-give-up attitude is the virtue or rather aptitude that the entire team tries to grasp and follow. From client relations to business development, from industry updates to floor walking, he does everything in his power to provide support to the team.

Leave a Reply

Your email address will not be published.

Company Strength

  • 1200+ Projects Completed
  • 12+ Years of Experience
  • 600+ Global Customers
  • 200+ Development Staff
  • 72% Location we Serve
  • 32+ Specific Industry
Talk to our expert arrow

Corporate Video

corporate video

Our Clients

Recent Blogs

Call Us Now