Google Flutter hits beta: Another go at cross-platform mobile dev

Using the Dart language for apps on Android and iOS

By Tim Anderson


MWC2018 Fancy a Flutter? Google is hoping users will take a bet on its new cross-platform mobile development framework, whose first beta was announced at Mobile World Congress last week.

Flutter is based on Dart, an object-oriented C-style language developed at Google, where it was designed by Lars Bak and Kasper Lund. It was first announced in 2011 with the intent to bring structured programming to the web. It was adopted as an ECMA standard in 2013. Google once intended to integrate a Dart VM into its Chrome browser, but in 2015 the team changed tack to focus on compiling Dart to JavaScript so it would run in any web browser.

Dart is often compared with Microsoft’s TypeScript, which also compiles to JavaScript and has a similar goal of bringing structured, typed programming to web development and making large applications safer and more manageable. However TypeScript is a superset of JavaScript, whereas Dart is a different language that compiles to JavaScript. This has made TypeScript popular for web development, but less suitable for mobile applications, though you can use it with Apache Cordova – applications that use the mobile browser and JavaScript engine - or other tools such as Telerik’s NativeScript.

Dart on the other hand benefits from a native code compiler that targets both Android and iOS. One way to think of Flutter is that it extends Dart to mobile apps.

Developing a Flutter app with Android Studio (click to enlarge).

Why would you use Dart rather than some other framework? The ability to share code across Android and iOS is attractive, but there are many other options for this. Dart does benefit from a modern design, including a reactive framework which means that changes in state can automatically propagate through the user interface. It also has a well-designed set of widgets including Material Components that implement Google’s Material Design concept, and Cupertino widgets that follow the iOS design style. No surprise: the Material Design set is more comprehensive.

You can use any editor for Flutter development, but there are specific plugins for Android Studio, JetBrains IntelliJ (on which Android Studio is based), and Microsoft’s Visual Studio Code. Getting started is a matter of installing the usual components of an Android development environment and adding the Dart and Flutter SDK and tools. The Flutter team has a nice tool called Flutter doctor which checks dependencies and makes recommendations.

The Flutter tools do not include any kind of visual designer. At Google’s Mobile World Congress stand I was told that such a designer could get in the way of designing a responsive user interface. That said, a great feature of the debug environment is called Hot Reload. This lets you change the code while debugging, press r in the terminal pane, and see the change almost immediately reflected in the running application.

Flutter (and Dart) are open source and free to use. Why is Google investing in it? The answer, I was told, is that Google hopes Dart users will use other Google services. The idea is that a framework that simplifies building Android applications that conform to Google’s design guidelines will also benefit Android as a whole. In other words, the same reasons platform companies always have for providing free or subsidised development tools. ®

Sign up to our NewsletterGet IT in your inbox daily


More from The Register

Google Play Store spews malware onto 9 million 'Droids

How did these get through the net?

FYI: Drone maker DJI's 'Get it on Google Play' website button definitely does not get the app from Google Play...

Updated Quadcopter slinger rudely palms folk off to .apk download

Latest Google+ flaw leads Chocolate Factory to shut down site early

52.5 million accounts at risk, tens of people are worried

Here you go, cloudy admins: Google emits NATty odds 'n' sods

Google Cloud Next Incremental titbits aimed at time-poor techies

FCC tosses aside rules, treats Google to a happy ending following request for handy tech

Comms watchdog lets Chocolate Factory power up with special waiver

Google's secret to a healthy phone? Remote-controlling your apps

Look Ma, no not much malware!

Thanksgiving brings together Apple's Siri and Google Assistant

A divided tech nation embraces, uncomfortably

Google now minus Google Plus: Social mini-network faces axe in data leak bug drama

Project Zero would have been all over this – yet it remained under wraps

Google-whisperers beat reCaptcha voice challenge with 90% success rate

Code's up on Github and Google's fine with that

Comparison sites cry foul over Google Shopping service

Original complainants say pay-to-play remedy has left them in the cold