Top 10 Features Of Flutter 2.2

  Nikita Singh    November 2, 2021    350

 

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:

https://solaceinfotech.com/blog/top-10-features-of-flutter-2-2/


 Article keywords:
devops, software, technology

 


 Share this article: 
Print Digg StumbleUpon del.icio.us Facebook Yahoo! Buzz Twitter Google Bookmarks LinkedIn MySpace Orkut PDF Scoopeo Viadeo Add to favorites
      

© Copyright - Articles XP