What’s new with Flutter 1.7 & how to upgrade to the latest version
Flutter has got a new & improved version of itself in it’s July release. The release is available now in the stable channel for users to upgrade. Flutter 1.7 contains support for AndroidX and for updated Play Store requirements, a number of new and enhanced components, and bug fixes to customer-reported issues.
Upgrading to Flutter 1.7
If you already have Flutter on your system and you’re on the default stable channel, you can upgrade to version 1.7 by running
flutter upgrade from the command line.
If you want to freshly install Flutter on your system, this is the place for you:
New Features & Upgrades
New widgets and framework enhancements
- Range Slider
This release features a new
RangeSlidercontrol that lets you select a range of values on a single slider (for example a minimum and maximum temperature value):
SnackBarwidget supports an updated look in the Material spec, and a number of new samples are added to the documentation.
The fidelity of the
CupertinoDateTimePickerwidgets are updated and added support for localization to non-English languages.
- Text Selection & Editing
Flutter devs have made major improvements to the text selection and editing experience on iOS, regardless of whether you’re using the Material or Cupertino design language.
- Text Rendring
Text rendering gets a big upgrade with support for rich typography features, including tabular and old-style numbers, slashed zeros, and stylistic sets, as this demo shows:
- Game Controllers
Flutter now has built-in support for gaming controllers and you can build those feature natively.
AndroidX Support for New Apps
AndroidX is a new open-source support library from the Jetpack team that helps Android apps stay updated with the latest components without sacrificing backward compatibility. Now that AndroidX is itself stable and many Flutter packages have been updated to support it, Flutter supports creating new Flutter projects with AndroidX, which reduces the work needed to integrate with other parts of the Android ecosystem.
When creating a Flutter project, you can add the
--androidx flag to ensure the generated project targets the new support library. Information about migrating existing projects to AndroidX can be found on flutter.dev. We’re actively working on bringing AndroidX / Jetifier support for apps with mixed AndroidX / Android Support libraries, such as in add-to-app cases, and will have more to share on this front in a forthcoming post.
Support for Android app bundles and 64-bit Android apps
From August 1st, 2019, Android apps that use native code and target Android 9 Pie will be required to provide a 64-bit version in addition to the 32-bit version when publishing to the Google Play Store. While Flutter has long supported generating 64-bit Android apps, version 1.7 adds support for creating Android App Bundles that target both 64-bit and 32-bit from a single submission. The particular steps for how to create separate APK files for both 32-bit and 64-bit devices are provided in a separate blog post.
Building apps on Xcode becomes easy
Flutter has particular added support for the new Xcode build system in Flutter 1.7 release, so as to make the development of Flutter apps easy & comfortable on Mac. The support can be easily enabled for existing projects in minimum clicks.
Over 1250 issues closed on Github
Flutter responded to customer-reported issues, with over 1,250 issues closed in the two months since their last stable release in May.
With the rapid growth in Flutter is working to increase staffing in this area, which will help with faster triaging of new bugs, closing and merging duplicate issues and redirecting support requests to StackOverflow.
Flutter team has also fixed the top crashing bug, which was an error when the Flutter tool is unable to write to the Flutter directory. Flutter now fails gracefully if the user doesn’t have write permissions, with clearer indications on how to fix the problem.
Updated Documentation & Samples
In terms of documentation, Flutter has an ever-increasing list of samples that can be created directly from the flutter create tool. From the command line, you can run a command such as:
$ flutter create --sample=material.AppBar.1 mysample
If a sample can be created in this way, you’ll see a “Sample in the App” tab in the documentation of that particular widget.
Behind the scenes, you’ll see lots of underlying work to create infrastructure towards enabling Flutter on macOS and Windows, with further support for important concepts like right-clicking and unique platform infrastructure such as MSBuild. Support for non-mobile platforms is not yet available in the stable channel, however.