What's new in Flutter 2.0?
Google launched Flutter 2.0 at an event named Flutter Engage, with all the extraordinary features and fixes. In this stable release, Flutter has closed 24,541 issues, merged 17,039 PRs from 765 contributors. Along with Flutter 2.0, they also introduced Dart 2.12.
Using Flutter 2.0, now you can utilize a similar codebase for shipping native applications to 5 Operating Systems: Android, iOS, macOS, Windows, and Linux. So, let's see the Top features that came to Flutter with this update.
Web Support for Flutter
One of the most exciting features was Web Support for Flutter. Flutter Web is stable now. Just like we run our app on emulators, we can now also run it as a web app.
Being in the Stable version, we don't need to switch the Flutter version for trying Web Support. It's available on the Flutter Stable channel itself. Flutter supports HTML renderer and CanvasKit renderer.
Dart 2.12 with Support for Sound Null Safety
Flutter 2.0 also brought Sound Null safety concept for Dart. Sound null safety can reduce cringe null reference exceptions. Null Safety in Dart can be simply explained as:
"All variables are considered as non-nullable unless we tell they are." So, there's no null by default.
Desktop Support for Flutter
Similar to the web, Flutter has also extended its support to Desktop applications. Desktop support allows you to compile Flutter source code to a native Windows, macOS, or Linux desktop app.
Flutter’s desktop support also extends to plugins—you can install existing plugins that support the Windows, macOS, or Linux platforms, or you can create your own.
The flutter release also enables smoother resizing for Windows and macOS. Developers can also find information about beta channels if they wish to try the beta for the flutter desktop.
Google Mobile Ads
One of the features that were introduced was the Google Mobile Ads SDK beta version. Developers can now include inline banners and native ads along with the already existing formats.
This new SDK works well with AdManager and AdMob for providing different ad formats, incorporating native, banner, rewarded video ads, etc.
Latest iOS widgets
Flutter 2.0 also added new iOS widgets in the Cupertino widget design language. The new iOS widgets introduced were CupertinoSearchTextField, CupertinoFormRow, CupertinoFormSection, and CupertinoTextFormFieldRow.
CupertinoSearchTextField provides search UI in the Cupertino widget design language. CupertinoFormRow, CupertinoFormSection, and CupertinoTextFormFieldRow widgets provide iOS specific UI for dealing with form fields, rows, etc.
These were some of the Flutter 2.0 features I was excited about. To find about all the new changes in Flutter 2.0, visit Official Flutter documentation at https://flutter.dev/docs/whats-new.
Top comments (0)