1
头图

By Tim Sneath, Product Manager, Flutter and Dart Product Group, Google

Flutter 3 implements Flutter's mobile-centric expansion to multi-platform product planning, and was officially released at this year's I/O conference keynote speech. This release provides stable version support for macOS and Linux desktops, as well as Firebase. Integration improvements add new productivity and performance-related features and support for Apple silicon.

The evolution of Flutter 3

Flutter was created to revolutionize application development: combining "iterative development of web applications" with "hardware-accelerated graphics rendering" and "pixel-level control" -- something that only games could do before. In the four years since the release of Flutter 1.0 Beta, we have gradually developed on these foundations, adding new framework functions and new widgets, deeper integration with the underlying platform, and a rich package library. Numerous performance and tooling improvements have also been made.

As Flutter gradually matures, more and more people start to use it to build applications. Today, more than 500,000 apps are published using Flutter. Analysis from research firms like data.ai, as well as public reviews, show that Flutter is being used by customers in many niches. Its usage scenarios are very wide, from social applications such as WeChat (WeChat), to financial and banking applications such as Betterment and Nubank, to business travel applications such as SHEIN and trip.com, and lifestyle applications such as Fastic and Tabcorp , as well as My Hardware connection applications such as BMW , and finally official applications of public institutions such as the Brazilian government, etc., all have Flutter shine.

There are now over 500,000 apps built with Flutter.

Developers tell us that Flutter helps them build beautiful apps faster on more platforms. Our latest user research also shows:

  • 91% of developers believe that Flutter reduces the time to build and publish apps.
  • 85% of developers think Flutter makes their apps more polished than ever.
  • 85% of developers believe that Flutter enables their apps to be released on more platforms.

Sonos discussed their work on revamping the setup experience in a recent blog post , which highlighted the second point above:

It's no exaggeration to say that Flutter brings us a "sense of premium" unlike anything our team has provided before. Most importantly for our designers, the ease with which they can build new user interfaces means that our team will say less "can't" and more directly iterate. If you think what we're saying makes sense, we recommend you try Flutter - at least we're glad we chose it in the first place.

Welcome to Flutter 3

Flutter 3 is officially released, and so far, Flutter's cross-platform journey has reached a climax. With Flutter 3, you can build beautiful experiences for 6 platforms with just one codebase. It provides developers with unparalleled productivity and enables startup teams to bring new ideas to a fully usable market from day one.

In previous releases, we have added support for the web and Windows platforms in addition to the iOS and Android platforms, and now Flutter 3 adds stable support for macOS and Linux apps . Adding platform support requires more than just rendering pixels: it also includes support for new input and interaction models, compilation and build support, accessibility and internationalization support, and platform-specific integration. Our goal is to give you the flexibility to take full advantage of the underlying operating system while sharing as much user interface and logic as you choose.

On macOS, we've dedicated resources to support Intel processors and Apple chips, and provide support for Universal Binary files , which enable apps to be packaged into executables that run natively on both architectures. On Linux, Canonical and Google have partnered to bring developers the best possible development tools that are highly integrated.

Superlist is a great example of how Flutter can help you achieve a beautiful desktop experience, and it's available in beta today. Superlist offers powerful collaboration capabilities, bringing together lists, tasks, and free-form content in a brand-new app that brings things like to-dos and personal planning to a new look. The Superlist team chose Flutter for its ability to provide a fast and highly branded desktop experience. We think their progress so far shows that this is a very smart choice.

Flutter 3 also brings improvements to many essentials, improving performance, enhancing Material You support, and further improving productivity.

In addition to what was mentioned above, with this release, Flutter has fully supported native development on Apple silicon . While Flutter has been compatible with M1-powered Apple devices since the inception of the M1 processor, Flutter now takes full advantage of Dart's support for Apple Silicon, enabling faster compilation on M1-powered devices, and support for macOS apps. Universal binaries.

In this release, our support for Material Design 3 is almost complete. Developers can now take full advantage of this responsive, cross-platform design system, including its dynamic color scheme and updated visual components.

We'll also be publishing a more detailed technical article in the near future with more on this and many other new features in Flutter 3.

Flutter is powered by the Dart programming language, a highly productive, portable language for multi-platform development. Our improvements to Dart in this release cycle include: enumeration support for member variables, improved superclass parameter inheritance, and new language features related to more flexible named parameters; also enabled for package:lints 2.x version, this is a set of official lint rules, which is a lint rule set integrated according to the Dart best practices we have summarized; at the same time, we have also updated the API documentation of the core library to bring Comes with rich sample code. And, to improve platform integration features, we provide a new template in the Flutter plugin, using dart:ffi for C interoperability with native platforms, experimental support for the RISC-V instruction set, and Signing support for macOS and Windows executables. For details on all the new improvements in Dart 2.17, stay tuned for an upcoming article.

Firebase and Flutter

Of course, building applications is more than building user interface frameworks. Application publishers need a comprehensive set of tools to help them build, publish, and operate their applications, including services such as authentication, data storage, cloud capabilities, and device testing. Several services currently support Flutter, including Sentry , AppWrite , and AWS Amplify .

Firebase is an app service platform provided by Google. SlashData's developer benchmark study shows that 62% of Flutter developers use Firebase in their apps. So, over the past few releases, we've been working with Firebase to expand and improve the integration between the two and make it the preferred integration service for Flutter. This includes upgrading Flutter's Firebase plugin to 1.0, adding better documentation and tooling, and providing new widgets like FlutterFire UI , which provides developers with a reusable authentication and user profile interface.

Today, we're announcing that the integration of Flutter and Firebase is part of the core Firebase product and is fully supported. We've moved the source code and documentation to Firebase's main repo and website. Firebase's support for Flutter will evolve in parallel with Android and iOS support.

Additionally, we've made major improvements to support Flutter apps using Crashlytics (the popular real-time crash reporting service in Firebase). With the updated Flutter Crashlytics plugin, you can track fatal errors in real-time using the same feature set as iOS and Android developers. These include important alerts and metrics like "crashing free users" to help you keep your app stable. Crashlytics' analytics pipeline has been upgraded to improve the aggregation handling of Flutter crashes, making it faster to grade, prioritize, and fix issues. Finally, we've simplified the plugin setup process so you can set up and use Crashlytics directly from your Dart code in just a few steps.

Flutter Casual Game Kit

For most developers, Flutter is an application framework. However, with the hardware graphics acceleration support provided by Flutter and open source game engines like Flame, the community built around casual game development is also growing. We want to make it easier for casual game developers to get started, so at I/O today, we're releasing the Flutter Casual Game Toolkit, which provides templates, a best-practice starter kit, and a Sponsorship credits available for advertising and cloud services.

Although Flutter was not designed for high-intensity 3D action games, today, some of these games have begun to use Flutter in the user interface part independent of the game scene, including PUBG Mobile, which has hundreds of millions of users. game. At I/O, we wanted to see how far we could push the technology, so we created a fun pinball game using Firebase and Flutter's web support. The I/O Pinball game offers a custom tabletop designed around four of Google's most popular mascots: Flutter's Dash, Firebase's Sparky, Android Robot, and Chrome Dinosaur, which you can find in this game Compete with others. We wanted to showcase the versatility of Flutter in this fun way.

Flutter: powered by Google, driven by the community

One of the things we love about Flutter is that it's not just a Google product - it's a "for everyone" product. Open source means that we can all be involved in it and have a stake in its success. You can contribute new code or documentation, create packages to give new superpowers to the core framework, write books and training courses to teach others, help organize events and user communities, and more.

To showcase the awesomeness of the community, we recently partnered with DevPost to sponsor the Puzzle Hack challenge, which lets developers demonstrate their skills with Flutter's classic swipe puzzle. This event presents the perfect combination of web, desktop and mobile: now everyone can play these games through the browser or the app store.

Thank you for supporting Flutter and welcome to Flutter 3!


Flutter
350 声望2.5k 粉丝

Flutter 为应用开发带来了革新: 只要一套代码库,即可构建、测试和发布适用于移动、Web、桌面和嵌入式平台的精美应用。Flutter 中文开发者网站 flutter.cn