Google's Flutter 1.0 wants to 'take compromise out of app development'
This week Google launched the first stable release of its mobile UI toolkit, Flutter 1.0. Pitched as a way to create apps for both Android and iOS, the software sets itself out as a middle layer for software makers; sitting between platforms like a code-based railroad switch.
The release comes after months of preview builds, with Google pointing enthusiastically to prominent Flutter-based apps already perched on Apple's and Google's respective storefronts. These include the company's own Google Ads app, apps for Chinese companies Alibaba and Tencent, as well as Abbey Road Studios and the musical Hamilton.
With the launch of Flutter 1.0, the makers of the cross-platform engine want to take these early successes and teeter the toolkit towards mainstream adoption. App development has become too cumbersome, goes the argument; too fragmented. Developing separate apps for Android and iOS can be a drain on company resources, but it needn't be.
Alibaba, Tencent, Abbey Road Studios and inKino are some of those already building apps on the platform
"I can't think of many other scenarios where a company would do the same thing twice just to solve the same set of problems," says Tim Sneath, group product manager for Flutter. "It's a very inefficient process. If you're a business, today you have to split your resources across two teams, and deal with all the idiosyncrasies of that process. Now, you get to bring your team together; put all your resources into crafting a single, beautiful application."
"These other solutions typically involve compromise," says Sneath. "And they're typically lowest common denominator solutions."
Flutter's code is powered by the Dart programming language, also created by Google. Dart enables compilation to native 32-bit and 64-bit ARM code for iOS and Android, and it's this native potential, Sneath says, that gives Flutter its scope to be an effective connector to both Android and iOS ecosystems.
The toolkit also uses the hardware-accelerated Skia 2D engine, and comes with a vast collection of widgets; components of interfaces that can be visual, structural and interactive. These include Google's own Material Design UI, as well as 'Cupertino'; Apple-style widgets that mimic the current iOS design language.
There are already a bunch of widgets available, including the 'Cupertino' selection
"To design without compromise, you need control," Sneath tells IT Pro. "Just as Unity gives game developers the ability to completely design their games, Flutter does the same for app development. Developers want to build apps that feel like they're intended for the platform. Flutter's ability to have code that compiles directly down to the native ARM machine code gives you a level of performance that's hard to realise in any other way."
A fragmented industry
While Android and iOS have been Flutter's primary targets, Sneath explains that his team has bigger ambitions: eventually aiming to turn the software into a general purpose UI toolkit, not only for mobile apps, but for all sorts of screen-based scenarios. During the unveiling of Flutter 1.0, the company previewed an experimental project dubbed 'Hummingbird', which brings entire Flutter apps to the "modern, standards-based web".
Flutter 1.0 running inside a web page
As with the team's approach to Android and iOS, the idea is that Flutter becomes a write once, run anywhere solution for developers, with a shared underlying code feeding into a multiplicity of platforms. And Google's ambitions don't stop with web browsers. Flutter was recently ported to Raspberry Pi using the mini computer's underlying platform, without needing to rely on extra systems such as Linux or X11.
"That really speaks to Flutter's embeddability; and potential usage for all kinds of IoT scenarios, like automotive, or even home appliances," says Sneath. "Basically, anywhere you can paint pixels, our ambition is that Flutter is able to go there."
Google hasn't said when, or if, the code for Hummingbird will be released. Compiling to the web remains an experimental project, but it feeds into Flutter's ambitions to be a one-stop shop for all a developer's UI needs. This isn't only nice to have, Sneath argues, but an increasingly important aspect of creating software for an industry that's fragmented between different operating systems.
"It's a real challenge, this fragmentation, not only of operating systems but also classes of device," he tells me. "It's becoming increasingly obvious that developers need something that isn't only targeting one class of device, but can span to all these places - without sacrificing the quality any serious developer would want for their experience."
Stateful hot reload
For now, Flutter 1.0 is free and available to download. Alongside this week's launch, Google also announced new third-party integrations for the toolkit from the payments firm Square, animation software studio 2Dimensions and coding company Nevercode.
Flutter also comes with a feature called 'stateful hot reload', which might sound like a lesser known jazz-funk band, but is actually a tool for tweaking code in real time, without the need to restart an app.
'Stateful hot reload' in action
Google has also said it will be rolling out an 'Add to App' mode, making things easier for developers that want to ease Flutter code into pre-existing apps. The flipside of this is also being introduced, called 'Platform Views', which will allow Android or iPhone platform controls to be embedding into Flutter apps.
With this being only the first stable release of Flutter, it still feels like early days for cross-platform app making. How Google's toolkit will square up against Facebook's approach with React Native remains to be seen, but the growth of both signal that the days of separate app development teams could become a thing of the past.
"I think mobile development today falls into compromise," says Sneath. "Either you have to build the same app twice - once for iOS and once for Android - or use a cross-platform toolkit, which aims to extract from the underlying platform and give a solution. With Flutter we've really tried to find a third way."