Technology is a boon on humankind, and Google proves it again, launching the latest version of Flutter, 2.0 on March 3 at an event called Flutter Engage. It is an open-source UI development kit that assists
cross-platform developers in building cross-platform apps using a similar codebase. This upgrade has helped Google maximize Flutter features and design a new version to make a move beyond mobile to support apps wherever they belong to - the web, desktop, and increasing form factors like foldable.
Flutter 2 gives a web experience targeting browsers such as Safari, Edge, Chrome, or Firefox. You can infuse Flutter in TVs, smart homes, apparatuses, and cars, giving the most portable & pervasive experience for a surrounding computer world.
So, What’s New In Flutter 2?
Keep reading this blog to know what’s new in Flutter 2 and how it targets app developers across various platforms.
Flutter’s Desktop Support
There have been several improvements to bring Flutter desktop to high-quality, ensuring that text editing options such as native experience on every supported platform, infusing foundational features such as text selection pivot points.
Google has even added an in-built context menu to the TextField widgets & TextFormField for Material design languages and Cupertino. Grab handles have also been added to the ReorderableListView widget. This widget has always been great at shifting things around with fewer efforts from a developer.
For additional desktop-specific functionality, Flutter 2 launch also enables command-line argument management for
Flutter apps, so simple things like a double-click on a data file can be used for opening the file in your app.
Google has also updated docs on which developers need to prepare their desktop apps for deployment to the accurate OS-specific stores.
Flutter’s Web Support
Flutter’s web support is the greatest announcement in Flutter 2. Earlier, the web’s foundation was document-focused. But the web platform has built to circulate richer platform APIs that enable super sophisticated apps using hardware-accelerated 2D & graphics, flexible layout, and paint APIs.
Flutter’s web support builds these innovations, rendering an app-centric framework that leverages the full benefits of everything the modern web must provide.
Google added web-specific features such as text autofill, control over address bar URLs, routing and PWA manifests. They also included a Link Widget to make sure a mobile app running in the browser feels like a web app.
Flutter Fix
Flutter fix blends many things. There is a unique command-line option to the Dart CLI tool called Dart Fix that knows where to look for a list of deprecated APIs & how to upgrade code with those APIs. Later comes the list of accessible fixes, packed with the Flutter SDK as of version 2. And eventually, it’s an updated set of Flutter extensions for the VS Code, IntelliJ, and Android Studio IDEs that can exhibit a similar list of available solutions as quick fixes with tiny light bulbs to help app developers change their codes with their mouse.
Flutter’s Extended Portability
Flutter is expanding increasingly to various types of devices, beyond the traditional and web smartphones. Google highlighted three team-ups that display Flutter’s maximized portability.
Starting with Canonical, collaborating with Google for bringing Flutter to desktop with app developers rendering code for supporting deployment & development on Linux. Canonical wishes to provide sturdy yet stunning experiences on multiple hardware configurations.
Next comes is Microsoft which will increase its support for Flutter. Microsoft will launch contributions to Flutter Engine that provides support to the increasing foldable android devices.
Lastly, Toyota, the world’s top-selling vehicle producer, announced its techniques for bringing the top-in-class digital experiences to cars by developing infotainment systems enabled by Flutter.
App-to-App
Now app developers can take advantage of Flutter by adding it to their existing iOS and Android apps. This feature is called App-to-App, which is an excellent way to reuse the Flutter code across both platforms while still saving your exciting native codebase. The new APIs that permit this are in preview mode on the beta channel. These APIs are documented on Flutter.dev along with a set of sample projects displaying this new pattern. Google can recommend developing different instances of the Flutter engine in native apps.
Launch of Dart 2.12 for Supporting Sound Null Safety
Google has even released Dart 2.12 for supporting sound null safety. This safety can prevent cringe null reference exceptions. It renders assurances at development & runtime that types can just include null values if the developer picks expressly. This update even infuses a consistent application of FFI, which allows developers to write high-performance code that can interchange with C-based APIs and new profiler tooling written with Flutter & integrated developer, and several sizes and performance improvements that upgrade your code for free.
Google Mobile Ads to Beta: The Upcoming Flutter Ecosystem
Google announces the beta release of Flutter’s Google Mobile Ads. This latest SDK works well with AdMob and AdManager for rendering different ad formats, infusing native, banner, rewarded video ads, and interstitial. Google has been disclosing this SDK with several important users like Sua Musica, the biggest music platform for many Latin American musicians.
Flutter DevTools
Google has done lots of work to bring Flutter to make DevTools the production quality worthy of Flutter 2. A new feature that helps app developers prevent their issues before they have launched DevTools is the capacity for Android Studio, Visual Studio Code, or IntelliJ for noticing when there is a basic exception & render for bringing it up in DevTools for debugging it.
DevTools offers another new feature for the capacity to see a photo easily that is at a higher resolution than shown. This helps track down additional memory use & app size. Enable the Invert Oversized Photos in the Flutter Inspector for turning on this feature.
The Endnote
Finally, we would like to add that Flutter 2 is not available for app developers only. It is free-to-use and open-source. If you still haven’t used it, try this prime upgrade for a unique app development experience.