Top 10 Features Of Flutter 2.2

Top 10 features of flutter 2.2

At the recent I/O conference, the flutter team confirmed that more than 200,000 apps are created with Flutter only in the Play Store. More than one in every eight new apps in Play store are built with Flutter. Popular companies like BMW, Shein, Tencent and new emerging companies use Flutter to create innovative apps. With Flutter 2.2, you get the way out for optimizing, polishing and improving iOS, Android, Web and Desktop app performance. Also there are more material icons, automatic scrolling behavior on mobile and desktop, improved text handling and lots of exciting features. Here we’ve curated some more new features of Flutter 2.2.

Know the reasons to choose Flutter at- Why Startups Should Choose Flutter For Mobile App Development?

Top 10 Features of Flutter 2.2-

1. Dart 2.13-

Dart also gets updated with new features accompanied by Flutter 2.2. It brings some new features to its FFI for calling C code, official Docker support and Google Cloud support for Dart backends. It also offers support type aliases that makes code easy to read and maintain.

2. Performance Improvements-

By using Dart’s split AOT compilation feature, Flutter team has built support for android apps to download modules ahead-of-time resource and code at runtime. They call these installable splits deferred components. It can reduce the initial app size and allow to download features and resources when a user needs them. Whereas, for ios, new update offers new tools to precompile shaders to remove or reduce the first-run jank. Jank occurs when the time to compile shaders goes beyond the time limit. These improved features of Android and iOS are now in preview mode.

You can also know- Top 11 Flutter Widgets To Know In 2021

3. Type Alias-

You can create a new name for any existing type and then that name can be used rather than an existing type. Prior to Dart 2.13 users can create a type alias for function now it’s extended to the variable type.

For Example:

typedef  Length = double;
final Length x = 4;

Good thing about type alias is- it passes the type equality test also. You can legal to call the constructor on a type alias that names a class.

Example:

Void main() {
   debugPrint(double == Length); // True
}

Benefit of using type alias is that one can make it easy to read code to others.

4. Dart Foreign Function Interface-

FFI is a mechanism for calling C code. FFI has new feature through which users can wrap the inline array directly in dart. 

Example-

class StructInlineArray extends Struct {
   @Array(8)
   external Array<Unit8> arr;
}

Rather than

struct MyStruct {
   Unit8_t arr[8];
}

One more improvement in FFI is that it now supports packed structs. And this help to avoid padding to lower overall memory consumption.

For instance-

@Packed(4)
class TASKDIALOGCONFIG extends Struct {
  @Uint32()
  external int cbSize;
  @IntPtr()
  external int hwndParent;
  @IntPtr()
  external int hInstance;
  @Uint32()
  external int dwFlags;
}

5. Null Safety Update-

Whenever you create a project with Flutter 2.2, it will by default generate a project with null safety. Most of the plugins are relieved to the null safety it is safe to migrate Flutter app to sound null safety.

6. Custom Text Actions-

With Flutter 2.2 users can completely customize the keystrokes associated with text actions. This feature serves lots of possibilities for Flutter developers. For instance, users can send message with ENTER Key while still allowing a new line to be inserted by Ctrl + ENTER.

7. Mouse Cursor Over Text Spans-

You might know that, TextSpan is not a widget. We can change the mouse cursor while hovering over a clickable widget except TextSpan. Now it’s a past with Flutter 2.2 when you are using TestSpan with GestureDetector user will get the corresponding mouse cursor. It supports onEnter and onExit events.

8. Flutter Windows UWP Alpha-

One more update with Flutter 2.2 is for desktop lovers, support for Windows UWP has moved to alpha in the dev channel. UWP allows to take your Flutter apps to devices where standard Windows apps don’t run. To do this, you need to set up UWP requirements. Then switch to dev channel and enable UWP support:

$ flutter channel dev
$ flutter upgrade
$ flutter config — enable-windows-uwp-desktop

When enabled, app development includes a new winuwp folder, that allows you to build and run app in UWP container:

$ flutter create uwp_fun
$ cd uwp_fun
$ flutter pub get
$ flutter run -d winuwp

As you’re building a Windows UWP app that runs in sandbox environment on Windows, you need to do a hole in the app’s firewall on localhost during development to enable hot reload and debugger breakpoints. One can do with a checknetisolation command. When done with this, app will run as UWP app on windows.

9. Android Deferred Components-

For Android, flutter 2.2 release uses Dart’s split AOT compilation to enable Flutter apps to download modules containing ahead-of-time compiled code and assets at runtime. These installable splits a deferred component. Install size can be significantly reduced by deferring the download of code and assets to only when needed. When building with deferred component, dart compiles code imported exclusively with deferred keyword into individual shared libraries which are packed into deferred components together with resources. Now, deferred components are available only on Android, and is offered as an early preview.

Know the amazing flutter libraries and plugins at- Top 10 Flutter Libraries And Plugins To Use In 2020

10. Payments And Monetization-

For the monetization of apps, Flutter 2.2 is an important flutter version for developers. A new payment plugin is created with Google Pay team to simplify payments on Android and iOS. In-app purchases plugin is also updated from beta to production with matching Codelab.

Wrap Up-

Flutter 2.2 came with lots of amazing features and improvements as mentioned above. Apart from this, there are IDE plugins updates, improvements in FlutterFire, Flutter ecosystem and tooling updates too. If you’re thinking to use Flutter for your next project, you must know these amazing features of Flutter 2.2. In case of any difficulty, consult with Solace experts for flutter apps development. You can also hire dedicated Flutter developers of Solace team for a feature rich flutter app development. Connect with Solace and get a free quote for flutter app development. We will be happy to help you.   

Related Post