Google’s Flutter introduced a recent launch Flutter 2.0 that incorporates some amazing new features. It is one of the most awaited stable release of the platform after the release of Flutter 1.0 almost two years ago. Flutter 2.0 will now completely support for website and desktop applications, so that programmers can apply a common codebase for iOS, Android, Windows, macOS and Linux OS. The first version of UI device package focused on app builders when launched in 2017. The developers want that this compatibility, among unique advanced features, will drive more software engineers to the platform, as many seeking open-source programs are most adequately supported for mobile application development.
Using Google’s own Dart programming language, Flutter is designed to help developers to build apps that experience native to every platform they run on whilst sharing as much of code as feasible to avoid repetitive efforts. Here we will see new features in Flutter 2.0 that will be helpful for Foldable and Dual-Display Devices.
You can extend flutter to support desktop applications. Flutter allows developers to give a native-like app experience on each platform that it resides. Native-like experience includes mouse dragging with accuracy, built-in context menu, text selection pivot points and so on. Now, programmers can stop keyboard events even after their initiation. Developers can also expertise in grabbing handles and easily move items in the ReorderableListView widget. Also, there is an updated scrollbar widget that provides interactiveness in desktop applications using thumb.
Desktop flutter application will also show mouse hovers in page up – down tracks, and scroll bar. With this, developers can also use new ScrollabrTheme class to customize app according to requirement. Flutter release also allows seamless resizing for Windows and macOS. If you are thinking to deploy app on OS stores, you can go through the document provided by Flutter community. Developers can get detailed information about beta channels if they want to try the beta for flutter desktop. The stable channel doesn’t provide quick bug fixes as supported in the beta version. Flutter community moves ahead in the production-quality release so you can expect support for integration with native top-level menus, native-like text editing and accessibility support.
Flutter’s production quality web support is one of the largest declaration in Flutter 2.0. Earlier the web’s foundation was document-centric. However the web platform has developed to provide rich platform APIs that allow extremely sophisticated apps using hardware-accelerated 2D-3D graphics, paint APIs and flexible layout.
Flutter’s support for the web builds up these innovations, providing an application centered framework that reaps the benefits of all that the advanced web should give. This release focuses on 3 app scenarios: Progressive web apps, single page apps, bringing current flutter mobile apps to the web. Mainly google focused on performance and improvements to their rendering fidelity. Google added new CanvasKit based rendered made with WebAssembly. They also added features that are specific to web such as control on address bar URLs,text autofill, PWA manifests and routing. They also included a Link Widget to ensure that the mobile app running in the browser feels like web app.
Developers can leverage the benefits of Flutter, by adding it to their current Android and iOS apps, this feature is called as Add-to-App. It is a best way to reuse the Flutter code across both platforms while still storing current native codebase. New APIs that allow it are in preview on beta channel. These APIs are well documented on flutter.dev with a set of sample projects showing this new pattern. With this change, Google can suggest instance building of Flutter engine in native applications.
At whatever point any framework matures and accumulates users with large and large codebases, the inclination throughout the years is to try not to make any changes to the framework API to avoid breaking progressively more lines of code. With more than 5 lakhs Flutter app developers across an increasing number of platforms, Flutter 2 is fast come down into this category. Flutter Fix is combination of things. First, command line choice to the dart CLI tool called as dart repair that knows in which to search for a listing of deprecated APIs and a way to update code the use of one’s APIs. Second, it’s the listing of to be had fixes itself, that is combined with Flutter SDK as a version 2.0.
At last it is an updated set of Flutter extensions for VS Code, Android Studio IDEs, IntelliJ that recognize how to show that identical list of to be had fixes with little light bulbs that will help to modify the code with click of mouse.
Google releases the beta version of Google Mobile Ads for Flutter. This new SDK functions admirably with AdManager and AdMob for giving different ad formats, joining local, banner, rewarded video ads, and interstitial. Google has been uncovering this SDK with numerous primary customers like Sua Musica, the largest music platform for some specialists in Latin America. Now, Google is ready for opening the Google Mobile Ads for Flutter SDK for more adoption. Also, the organization declared updates to its Flutter plug-ins for many Firebase services, like Cloud Firestore, Cloud messaging, Authentication, cloud functions, Crashlytics and cloud storage, incorporating help for sound null safety and an update of cloud messaging package.
Google launched Dart 2.12 with support for sound null safety. It can reduce cringe null reference exceptions and provides assurances at development and runtime that types can comprise null values in case the developer selects expressly. This latest update also includes a consistent application of FFI, that allows developers to write high-performance code which can interoperate with C-based APIs, new profiler tooling written with Flutter and integrated developer, and many size and performance improvements that upgrade your code for free.
While building mobile apps, now developers can have access to two new widgets named as Autocomplete core and ScaffoldMessenger. Autocomplete is necessary and demanded feature which allows inducing auto-complete features in native apps built using Flutter. Whereas, Scaffoldmessenger helps in easy creation of SnackBar to be in action between Scaffold transitions.
Now flutter supports 3 platforms- android, iOS and web for app development and 3 more in beta(Linux, macOS and Windows). How is it possible to write an app that changes itself to several form factors, various idioms(desktop, web and mobile) and different input modes (mouse, keyboard and touch)? Google appointed the Flutter Folio scrapbooking application for responding to this question. Folio is simple example of app that will run appropriately on different platforms from just one codebase. This app is called as platform adaptive because it adapts properly to whatever platform it is running on.
With release of Flutter 2.0, the community has changed the name from DevTools to FlutterDevTools, particularly while debugging. New DevTool will allow AndroidStudio, IntelliJ or Visual Studio Code to check for exception and assist you with debugging. New DevTool has the capability to identify an image with higher resolution than shown. It helps to track extra memory use and app size. Google also included the capacity to display fixed layouts, allowing developers to debug all types of layouts. Here are some of the new features in Flutter DevTools 2 –
These are just some of the new features of Flutter 2.0. There can be some others too. So before starting the flutter development, you should know all these new features.