Flutter Boosts Web Support, Defaults to Swift, Kotlin for Native Mobile

Google's open source, cross-platform Flutter UI toolkit, which started with a mobile focus, boosted its Web development support and has embraced Swift for native iOS projects and Kotlin for Android.

The Flutter for Web implementation -- still in a technical preview -- was teased in May and enhanced in the new Flutter 1.9, unveiled at Google Developer Days in China.

Google described the brand-new release as its biggest ever, with 1,548 pull requests from 108 contributing developers. Highlighting the release was the advancement of Web development support.

"At the keynote, we also announced a major milestone for Flutter's Web support, with the successful integration of Flutter's Web support into the main Flutter repository, allowing developers to write for mobile, desktop and Web with the same codebase," said Chris Sells, project program manager, in a blog post today (Sept. 10).

"Support for Web output with Flutter is still at an early phase, but this release represents a major step forward towards enabling production support for Web development with Flutter."

Flutter Web Experimental Projects Flutter Widget Livebook and Panache
[Click on image for larger view.] Flutter Web Experimental Projects Flutter Widget Livebook and Panache (source: Google)

Sells also highlighted two community experiments that show Flutter's Web functionality in realized action:

  • Flutter Widget Livebook: built with Flutter for Web to show Flutter widgets running live in a browser
  • Panache: a tool for creating themes for Flutter which developers can download and drop directly into code

In listing toolchain improvements, Sells noted that projects started with the new release now default to Apple's newer Swift programming language instead of the aging Objective-C for iOS projects, while Android projects default to the newer Kotlin language instead of the aging Java.

"These options are now the default for both the flutter CLI tool and the IntelliJ/Android Studio and VS Code plugins for Flutter, but you can always switch back to Objective-C or Java if you prefer," Sells said.

Flutter primarily relies upon Google's Dart language, of course, and that has also received an update today, Dart 2.5.

Highlighting changes in the Dart 2.5 SDK are two technical previews:

  • ML Complete -- code completion powered by machine learning (ML)
  • The dart:ffi foreign function interface -- for calling C code directly from Dart

"This release is another step toward our vision of the best client-optimized language for creating fast apps for any platform," said Michael Thomsen, Dart program manager, in a Sept. 10 post. "First, we're introducing ML Complete, a new code completion experience based on machine learning. ML Complete is a powerful addition to our existing suite of productivity tools like hot reload, customizable static analysis, and Dart DevTools. The second preview feature, dart:ffi, enables you to leverage existing native APIs on the many operating systems where Dart code runs, as well as existing cross-platform native libraries written in C."

Along with improved Web functionality, Swift/Kotlin support and Dart 2.5, other highlights of Flutter 1.9 include:

  • Support for macOS Catalina and iOS 13: "As Apple prepares to release Catalina, the latest version of macOS, we've worked hard to make sure that Flutter is ready for you to upgrade. We've updated the end-to-end tooling experience to ensure it works well on Catalina and with Xcode 11. This includes adding support for the new Xcode build system, enabling 64-bit support throughout the toolchain, and simplifying platform dependencies."
  • New Material widgets: "The Material components and features also get an upgrade in Flutter 1.9. Material is one of the world's leading open-source design systems, providing a comprehensive, flexible set of building blocks for implementing interactive user experiences across many platforms."
  • Worldwide language support: "We've also added support for 24 new languages, from Afrikaans to Zulu."

All of the above and much more is presented in greater detail in the release notes, which list breaking API changes, several kinds of fixes and so on.

Flutter's open source development is carried out on GitHub.

About the Author

David Ramel is an editor and writer for Converge360.