Google launches Flutter 2 for cross-platform app development

Graphic showing the Flutter 2 branding
(Image credit: Google)

Google has upgraded its Flutter toolkit to allow mobile developers to seamlessly port native apps across a breadth of operating systems and web browsers, as well as devices such as TVs, cars, and smart home appliances.

Flutter, an open source software development kit (SDK) launched by Google in December 2018, allows developers to build mobile apps across both Android and iOS devices from a single codebase using the Dart language.

The next generation, dubbed Flutter 2, is a logical extension of this principle, with developers able to programme native apps across not just Android and iOS but also Windows, macOS, and Linux systems too. This is alongside web-based experiences across Chrome, Firefox, Safari, and Edge, as well as the operating systems powering IoT and smart devices.

“Our goal is to fundamentally shift how developers think about building apps, starting not with the platform you’re targeting but rather with the experience you want to create,” Google said in its Developer blog.

“In Flutter 2, released today, we’ve broadened Flutter from a mobile framework to a portable framework, unleashing your apps to run on a wide variety of different platforms with little or no change.”

Graphic showing the Flutter 2 branding across several devices

(Image credit: Google)

Developing for Android devices with Android Studio, an integrated development environment (IDE), differs from developing with Flutter, in that it’s a Java-incorporated development workbench for creators to develop and debug their source code for one platform.

Using Android Studio means developers can’t build apps native to iOS as well as Android – and must jump through hoops to convert their codebase to be compatible with iPhones, or rewrite them from scratch.

Flutter, by contrast, was launched with native cross-platform development in mind, with app creators able to build applications for both iOS and Android using a single codebase. Features such as platform APIs, third-party SDKs and reusable user interface (UI) blocks lend themselves to this aim.

Google also touts Flutter as allowing you to build aesthetically-pleasing apps at-pace, in addition to making changes as your app’s running in real-time with the ‘hot reload’ feature. The ecosystem of Flutter-developed apps includes roughly 150,000 services including apps such as WeChat and Yandex Go.

Google Pay even switched to Flutter in September last year to achieve improvements in productivity and quality. By unifying the iOS and Android codebases, the development team removed roughly 500,000 lines of code. There’s also been a reported increase in the efficiency for engineers, with a reduction in work needed around releases such as security reviews and experimentation, given two codebases have been contracted to one.

Desktop support was added to an earlier alpha release of Flutter, but this has just been moved into the toolkit’s ‘stable’ channel, meaning it’s now generally available.

Screenshot of Flutter being used in conjunction with Ubuntu

(Image credit: Google)

To make it happen, Google partnered with Canonical, the company that publishes Ubuntu, with the organisation’s engineers contributing code to support development and deployment on Linux installations.

RELATED RESOURCE

Go further with mobile marketing

Easy steps to get your mobile strategy up-to-speed

FREE DOWNLOAD

Google has also expanded its partnership with Microsoft, with the Windows developer releasing contributions to the Flutter engine to support foldable Android devices, including new design patterns and functionality.

With Flutter 2, app developers will also find added support for the web with a focus on progressive web apps (PWAs) as well as single-page apps (SPAs) and bringing existing Flutter mobile apps to the web with shared code.

Finally, a partnership with Toyota paves the way for writing in-vehicle software using Flutter, with the car manufacturer using Flutter’s embedder API to tailor Flutter for the unique needs of its vehicles.

Keumars Afifi-Sabet
Contributor

Keumars Afifi-Sabet is a writer and editor that specialises in public sector, cyber security, and cloud computing. He first joined ITPro as a staff writer in April 2018 and eventually became its Features Editor. Although a regular contributor to other tech sites in the past, these days you will find Keumars on LiveScience, where he runs its Technology section.