Adding Support for Desktop and Web AppsOn March 3, 2021, at an online event, Google announced the newest version of its open-source UI toolkit Flutter 2 for building portable apps. The big news is that Flutter 2 now supports web and desktop apps rather than just a mobile framework. This means Flutter developers can now use the same codebase to build apps for Windows, Android, iOS, Linux, macOS, and the web experiences targeting browsers such as Firefox, Chrome, Edge, or Safari. In the announcement post, Google’s Tim Sneath wrote “Flutter can even be embedded in cars, TVs and smart home appliances, providing the most pervasive and portable experience for an ambient computing world.” The biggest news in this release, perhaps, is Flutter’s sustenance for web apps hitting the steady milestone. Three key web app types supported by Flutter 2 are:
- Progressive Web Apps (PWAs), which functions like mobile apps and native desktop and provide key native app capabilities.
- Single-page apps (SPAs) that are loaded once and then communicate data to and from Internet services.
- Flutter mobile apps, which can be ported to the web, permitting a shared code experience.
The emerging Flutter ecosystem
The above video highlights top 10 things you need to know from the launch of Flutter 2 Using Google’s own client-optimized programming language Dart, Flutter is aimed to help developers build apps that feel native to mobile, desktop, server, and web applications they run on while sharing as much code as possible to avoid replicating efforts. Looking at the different requirements, Flutter offers two options when it comes to developing web apps: You can prefer an HTML renderer that is augmented for compatibility and size or a CanvasKit renderer that is fully consistent with Flutter desktop and mobile apps. It uses WebGL and WebAssembly to render Skia paint commands to the browser canvas. By default, Flutter apps for the web will be using the HTML renderer on mobile, and on the desktop platforms, it would use the CanvasKit renderer.
Also, Flutter 2 comes with expanded portability meaning Flutter-based apps are now working on multiple platforms. To share an example, Canonical Ltd., which leads the development of Ubuntu – the popular Linux-based operating system has made Flutter the default framework for all of its future mobile apps and desktop. Flutter has also won over Microsoft Corp. and is expanding its support for the framework on its Windows OS. Some major contributions to the Flutter engine would be released that can support the emerging class of foldable Android devices, reported Google. With the above achievement, Google s years-long dream with Flutter of writing code once that runs everywhere seems attainable. Interested to know more about Flutter? Learn more on the Flutter website. We will share more informational content about Flutter 2 in the coming times. Till then, stay tuned to PSSPL content. Happy Surfing!!