Google launches Flutter v2: Developers can use a single codebase to build apps for iOS, Android, Windows, macOS, Linux, and web browsers

Google Flutter v2
Google launches Flutter v2.0 to develop apps for any screen. Pic credit: Google

Google has unveiled Flutter v2. The first version allowed developers to create apps that run on both Android and iOS. The second iteration of the open-source UI development kit allows building apps that run ‘virtually anywhere there’s a screen’.

Google had introduced Flutter at its I/O developer conference back in 2017. Flutter 2.0 is way more powerful and versatile, assures the search giant. Using the new version of the platform, developers can build apps for iOS, Android, Windows, macOS, Linux, and web browsers.

Flutter officially evolves from a mobile framework to a portable framework:

With the new version of Flutter, Google’s app development framework officially evolves from a mobile framework to a portable framework. This means developers can build apps with a singular codebase that works on nearly any device with a screen.

Google’s official announcement about Flutter v2.0 reads: “With Flutter 2, you can use the same codebase to ship native apps to five operating systems: iOS, Android, Windows, macOS, and Linux; as well as web experiences targeting browsers such as Chrome, Firefox, Safari or Edge. Flutter can even be embedded in cars, TVs, and smart home appliances, providing the most pervasive and portable experience for an ambient computing world.”

“We’ve done a ton of work to get to this stage, including adding internationalization support, for example, IME editors for languages like Chinese, new widgets like TreeView and DataTable that are designed for desktop support, and better support for Apple Silicon-powered development machines,” noted Google’s Tim Sneath.

The biggest development within Flutter v2.0 is the support for web apps is now stable. Developers can now easily and reliably port existing apps to the web. Apart from the preexisting 150,000+ apps, developers can create new Flutter-based web apps.

Flutter 2 supports three key web app types:

  • Progressive Web Apps (PWAs), which function like native desktop and mobile apps and provide key native app capabilities.
  • Single-Page Apps (SPAs), which load once and then transmit data to and from Internet services.
  • Flutter mobile apps, which can be ported to the web, enabling a shared code experience.

Google’s Dart programming language helps Flutter v2.0:

Flutter v2.0 uses Google’s own Dart programming language. The company has designed the platform to help developers build apps that feel native to each platform they run on. Developers already benefit from reusing the majority of their code, which significantly reduces duplicating efforts, and development time and costs.

Moreover, Google has updated Dart to version 2.12. It now supports sound null safety. This feature will significantly help developers catch common sources of app crashes, and Dart FFI (Foreign Function Interface), for accessing C-based APIs, including the Win32 API used by Windows applications.

Interestingly, Dart complies with JavaScript. This makes web apps made using Flutter v2.0 feel more native and seamless.

With Flutter v2.0, developers get a choice of renderers as well. They can use an HTML renderer (optimized for size and compatibility) or CanvasKit renderer (fully consistent with Flutter mobile and desktop apps). By default, Flutter apps for the web will use the HTML renderer on mobile and the CanvasKit renderer on desktop platforms.

With Flutter v2.0 Google is a major step closer to its long-term dream: “Writing code once that runs everywhere.” As Mr. Sneath puts it, “With the ability to reach 6 platforms at once, the advantages to Flutter are real. This is a solution that works for large and small developers, and you can target the heterogeneous world in which we now live. We’re making it easier to get to all of those places at once.”

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x

Warning: Undefined variable $posts in /home/thetechherald/public_html/wp-content/themes/generatepress_child/functions.php on line 309

Warning: Trying to access array offset on value of type null in /home/thetechherald/public_html/wp-content/themes/generatepress_child/functions.php on line 309

Warning: Attempt to read property "post_author" on null in /home/thetechherald/public_html/wp-content/themes/generatepress_child/functions.php on line 309