What’s New in Flutter Beta 3

Tim Sneath
Flutter
Published in
5 min readMay 7, 2018

This week marks the release of the third beta for Flutter, our toolkit for building beautiful mobile UI for iOS and Android. In our announcement over at the Google Developer site, we provide a broader overview of the Flutter project and showcase some examples of how customers are using it to create amazing applications. In this blog post, we’ll take a deeper look at the specific improvements we’ve made in Beta 3 itself.

As mentioned when we shipped our first beta at Mobile World Congress in February, our intent is to continue to ship releases that are at least of beta quality on approximately a monthly cadence. This release (v0.3.2) is the third release in that lineage, and demonstrates continued progress towards completing the 1.0 release.

Our work in this release has focused on three primary areas: fundamentals, ecosystem and tooling.

Fundamentals

Let’s start with the fundamentals, where we’ve improved the built-in UI widgets, completed the remaining feature work for Dart 2, and introduced a new embedding API.

In Flutter Beta 3, we’ve made a number of improvements to the Material Design widgets to enable greater flexibility and customization. For example:

  • We added a BottomAppBar component;
  • Support for Chips has been greatly improved and expanded;
  • InputDecorator now supports filled/underlined and outlined modes;
  • FloatingActionButton now offers greater positioning flexibility;
  • Slider now offers customization of colors and shapes of the thumb and value indicators.

Additionally, we’ve added support for animated resources in formats like GIF and WebP, ready for your best meme apps to be published to the app stores!

We also made a number of updates to the Flutter Gallery application to demonstrate these and other changes. For example:

We’ve completed the work to enable Dart 2, our reboot of the Dart language that is optimized for client development. As of this release, Dart 2 is feature complete and enabled by default.

In this release, Dart 2 adds some syntactic sugar to help with instantiating widgets in Flutter. The new keyword is now entirely optional: there should be no need to use it any longer, and it’s a bug if the compiler complains. A build() method like this is easier than ever to write:

The const keyword becomes optional for any child constructors within an existing const scope. During the first two betas, we identified scenarios where it was difficult to infer from the context whether an object’s children are immutable, so we require the const keyword at the top level to make the constant nature of the code explicit. Once you’ve declared a section as const, however, the children are automatically const without requiring further declaration, so now a statement like the following is valid:

In other areas, we’ve made improvements to the accessibility support for apps that use Flutter, including improving support for screen readers, large text and contrast capabilities, as well as starting to document our accessibility support. We’re also ready for apps that are offered in languages with right-to-left scripts. In addition to supporting right-to-left text, controls mirror where appropriate (for example the left ‘back’ button has inverted direction and justification in languages like Arabic).

We’ve also rewritten the Flutter engine’s threading model to make it possible to host multiple FlutterViews within a single application. This is part of our larger focus on making it easier to add Flutter to your existing app — work that continues in progress.

Ecosystem

We launched an initial suite of Firebase plugins at Google I/O last year. Several of those plugins are reaching their 1.0 milestone this week: Realtime Database, Firebase Analytics, Firebase Messaging, and Firebase Core. In addition, we have added new, fully-featured plugins for Remote Config, Cloud Firestore, and Performance Monitoring. For an overview of our Firebase support, please see the FlutterFire page.

Our support for ads powered by AdMob by Google is graduating to beta, enabling you to monetize your Flutter-based applications. The AdMob plugin supports loading and displaying banner, interstitial (full-screen), and rewarded video ads using the AdMob API.

There are many other packages that have recently been made available for Flutter, some contributed by the Flutter team directly, others by community members. As mentioned in our I/O announcement post, Flutter is a first-class toolkit for Material, which means the Material and Flutter teams have partnered to deliver even more support for Material Design.

Tooling

We continue to release regular updates to the Flutter plugin for Android Studio and IntelliJ to improve the development experience. In particular, we’ve redesigned the UI Inspector with a new “Just My Widgets” feature that filters out auto-generated widgets. You can also run your Flutter app in profile mode, which adds frames-per-second and memory usage displays.

Visual Studio Code is now considered a fully-supported development environment for Flutter, in addition to the Android Studio support mentioned above. Flutter support is enabled through the Flutter extension, available through the Visual Studio Marketplace. The latest version of our Visual Studio Code extension supports Flutter Beta 3 features including Dart 2, and the changelog is here.

Other notable features in this release for both Android Studio and Visual Studio Code include a broader set of refactorings. This includes an Extract Widget refactor that creates a new Widget class and inserts a call to its constructor in the original position:

Connecting with us

There are a few ways to get in touch with us and find out what’s going on with Flutter.

  • We post announcements and have discussions in the flutter-dev group, and are also active on Twitter as @flutterio;
  • The best place to post technical questions is Stack Overflow, where there are plenty of experts on standby to help, including Google engineers;
  • If you spot a bug that you think we need to take a look at, you can file it at our GitHub repo. This is also a good place to upvote other suggestions that you think we should prioritize;
  • Lastly, if you have a Flutter app that you’d like to show us, we’d love to see it! We’re always looking for new demos and cool examples to share with others. Use this form to tell us what you’re working on!

--

--

Tim Sneath
Flutter

Director for Developer Tools and Frameworks at Apple. I used to run Flutter and Dart at Google.