Google Launches Flutter 2.0: Let's Dig Into Its Basicsby@karan.shah
653 reads
653 reads

Google Launches Flutter 2.0: Let's Dig Into Its Basics

by karan.shahApril 17th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Google Launches Flutter 2.0: Let's Dig Into Its Basics. The new update has brought several new features and fixes that are major improvements over the previous version. Flutter is an open-source UI software development kit. The major improvements in this release include a new client architecture, app bundling, the new navigation layout, and a more unified user experience across multiple platforms. This article will explore all the new widgets and added features of Flutter. You will get a more detailed understanding of the Flutter.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Google Launches Flutter 2.0: Let's Dig Into Its Basics
karan.shah HackerNoon profile picture

Google announced the release of Flutter 2.0 in an event titled “Flutter Engage,” marking a huge milestone after Flutter 1.0,  with the significant development of the UI software development kit. This new update has brought several new features and fixes that are major improvements over the previous version.

This article will explore all the new widgets and added features of Flutter 2.0. You will get a more detailed understanding of the Flutter 2.0 release's most significant changes by walking through this article.

But let’s brush up on the basics first!

What is Flutter?

Flutter is an open-source UI software development kit. Google launched the official version of Flutter in 2015. All the Flutter apps are usually written in Dart language and few other languages for more advanced features in the app. The Flutter platform was initially developed for applications targeting the iOS and Android platforms.

Flutter is the only SDK that offers reactive views without any JavaScript bridge. It compiles your source to machine code with the support of hot reload to get the productivity of interpreted environments. Flutter offered a comprehensive set of features to build web and mobile applications.

Flutter is an open ecosystem with a strong developer community that keeps adding to the core framework and extending it further. With Flutter 2.0, Google has broadened the functioning of Flutter from a mobile framework to a portable framework. This change has given all the apps the opportunity to run on multiple platforms without any hassle.

What's new in Flutter 2.0?

The major improvements in this release include a new client architecture, app bundling, the new navigation layout, and a more unified user experience across multiple platforms. Flutter's client architecture offers a unified client API to define UI's behaviours and build apps that can run on desktop, mobile, or web.

This launch of Flutter 2.0 has also changed the community name from DevTools to FlutterDev Tools. This community works relentlessly, especially to overcome debugging. It will enable the profiling tools to be run in the browser, installed from Visual Studio Code, IntelliJ, Command-Line, and Android Studio to help developers debug by checking for exceptions. Also, this tool is capable of identifying images that have a higher resolution.

Now, let’s dive deeper to explore Flutter 2.0. in detail:

Operating systems and browsers

Before Flutter 2.0 release, the app owners and developers used Flutter 1.0 only for Android and iOS app development projects. However, now with Flutter 2.0, the developers can use the same codebase to port native apps to five operating systems, i.e., iOS, Android, Windows, macOS, and Linux.

Flutter 2.0 developed web experiences for more browsers such as Safari, Chrome, Edge, and Firefox. Flutter has also extended its application even in TVs, cars, and smart home appliances for providing a more holistic digital experience in the computing world.

Flutter 2.0 on the web

One of the most prominent announcements in the Flutter 2 launch was the production-quality support for the web. The early development of the web was massively document-centric. However, with Flutter 2.0, the web-developed platform has been enriched with the state of the art APIs. This allows the development of advanced apps with hardware-driven 2D and 3D graphics and flexible layout.

Flutter’s web support now offers a highly app-centric framework. It helps to build modern webs through these innovative features and approaches. The Google team has released stable web support by making significant progress by performance optimization. They have added a new CanvasKit-powered rendering engine built with WebAssembly for programming languages, enabling deployment on the web and server applications.

The development team has further extended Flutter with text autofill, control over address bar URLs and routing, and PWA manifests. They added keyboard shortcuts, interactive scrollbars, screen reader support for accessibility, increased default content density in desktop modes on macOS, Windows, and Chrome OS. This feature empowers the tool to offer the best of the web platform to clients.

Flutter 2 on desktops

Unlike the previous version that stuck with mobile devices and the web platform. Flutter 2.0 has extended to other device types such as desktops, foldable, and embedded devices. Google has partnered with three industry giants to increase Flutter’s portability in the future.

Canonical is one of the partners responsible for bringing Flutter to desktop, with engineers contributing code to support development and deployment on Linux. Canonical needs to deliver a firm and delightful experience on a wide variety of hardware configurations.

Microsoft is another constant partner continuing to expand its support to Flutter by offering high-quality Windows support. Microsoft contributes to the Flutter engine by supporting foldable Android devices. These devices require new design patterns from the apps that can either expand content and design appropriately.

The third partner is Toyota – an automotive manufacturer planning to bring exclusive digital experience to vehicles by building infotainment systems powered by Flutter. Toyota has partnered with Flutter for its high performance, consistency, fast iteration and developer ergonomics, and, most importantly, smartphone-tier touch mechanics. Flutter’s embedder API will be used for in-vehicle system development.

New Widgets

Flutter offers a large variety of widgets to the developers. It’s by combining this different widget that developers can build the complete UI smoothly. Flutter widgets include a structural element (such as button or menu), stylistic element (such as font or colour scheme), layout aspect (such as padding), and much more.

Google has introduced new capabilities for developers by creating a new widget type customized for various elements. Flutter 2.0 reflects the prominent improvements focusing on the developer's experience. Apart from a new out-of-the-box SDK process, new widgets are being developed in Flutter now and then.

These new widgets are available for both iOS, Android, Windows, macOS, and Linux. This extensive pool of widgets is one of the most important pieces of the development toolkit. These Flutter widgets are bundled with the app design to perform specific functions in order.

For example, the updated scrollbar widget offers top-notch interactiveness in the desktop app. The desktop application also shows down the track; the mouse hovers in the scroll bar along with the option of app customization as per their preferences.

Google Mobile Ads and Plugins For Flutter

Google also launched the beta release of Google Mobile Ads for Flutter. This new Software development kit works with AdMob and AdManager to offer various ad formats, banner, native, interstitial, and rewarded video ads. A demo SDK project initiated for a few customers, such as Sua Música- the largest music platform for independent artists in Latin America, has been extended for broader adoption.

Flutter 2.0 has also updated Flutter plug-ins for several core Firebase services such as Authentication, Cloud Functions, Cloud Storage, Cloud Firestore, Cloud Messaging, and Crashlytics. Hence Mobile Ads and Plug-ins will be a new exclusive release that everyone will be looking forward to.

How Is Dart Boosting Flutter 2.0?

Like before, the new Flutter developer tool is powered by Dart. The most significant advantage of Flutter 2.0 is the portability of the app to different platforms. This easy transition to platforms is possible only through Dart. With its unique features, Dart helps to bring in multiple advantages for building apps such as:

  • Easy portability with efficient compilers for high-performance Intel and ARM machine code for mobile and desktop.
  • Optimised JavaScript output for web applications.
  • Iterative development with hot reload on desktop and mobile
  • Enabled asynchronous and concurrent patterns with modern UI programming.
  • Top-notch performance across all of the mentioned platforms
  • Sound - null safety guaranteeing at runtime and development stage.

The advantages mentioned above make Dart one of the fastest-growing languages on GitHub. Flutter 2.0 supports sound null safety that is a significant addition to the Dart language, further strengthening the type system by distinguishing nullable types from non-nullable types. It has the potential to eradicate null reference exceptions that can only contain null values if the developer expressly chooses.

This feature allows the developers to avoid any null error crashes of the apps during development. By integrating the null checks many errors can be traced in the type system during app building. The developer can incrementally add it to the code at their pace with available migration tools.

The Importance Of Flutter 2.0

The current state of the Flutter is quite significant in the market. There have been many successful examples of Flutter that highlight Flutter’s commitment to app development. A few of the many popular apps built using the Flutter framework are Alibaba, Reflectly, Hamilton Musical, Hookle, Watemaniac, etc.

Flutter is built on top of Google’s Android support library and is available for all central operating systems and browsers. The open-source community of Flutter brings in more diversity and added features for the developers.

There are more than 150,000 Flutter apps on the Play Store alone, and these apps get a free upgrade with Flutter 2 as they can simply port their ready code to desktop and web without a rewrite. Google is building apps with Dart and Flutter, such as Stadia, Google One, and the Google Nest Hub.

Google Pay also switched to Flutter for its extensive list of benefits along with productivity and quality. By unifying the codebase, the Google Pay team removed many feature disparities between platforms by eliminating over half a million lines of code. Flutter provided a uniform best-in-class development experience to the team with the Just-in-Time compiler with hot reload.

While Flutter is available on a free tier, it has partnered with many industry leaders to offer an excellent development framework by increasing portability. There are more than 15,000 packages for Flutter in the market from giant companies like Amazon, Adobe, Microsoft, eBay, Square, Alibaba, etc. These companies access key packages like Sentry, Lottie, and SVG, and Flutter Favorite packages such as google_fonts, sign_in_with_apple, SQLite, and geolocator.

Summing up

We have tried to give you a glimpse into a few prominent features of Flutter 2.0 in this article. We hope now you have a brief idea of all the significant changes in Flutter 2.0. This framework is tremendously efficient and flexible, so it may be time for you to know more about using it in your projects.

If you have other valuable resources to add, then feel free to do so in the comment section below.