Google Pay rewrote 1.7 million lines in Flutter and shrank its code by 35%
Google Pay ran two separate codebases totalling 1.7 million lines, with features shipping at different rates and tech debt piling up twice as fast. Its engineers now share a single Flutter codebase. Anna Domashych, a Google Developer Expert in Dart and Flutter, explains why Flutter performs unlike other cross-platform frameworks, and asks when a team should pick it and when it should deliberately choose something else.
Learn how Flutter works and how to judge whether it fits your next app project
Anna Domashych, a Google Developer Expert in Dart and Flutter, explains what Flutter is, how its own rendering approach sets it apart from other cross-platform frameworks, and five reasons to consider it. She also covers when another framework fits better, how to start developing, and how companies such as Google Pay, Toyota, ByteDance and BMW use Flutter in production.
“With Flutter, you can start with experience you want to create and then ship it to any device you want to target.”
“This way, designers and developers can create expressive and flexible UI where nothing limits their imagination.”
What you will learn
Explain how Flutter's own widget set and Skia rendering differ from cross-platform frameworks that wrap native UI libraries.
Evaluate Flutter against five criteria: beautiful UI, speed, portability, productivity and open source.
Recognise cases where another framework fits better, such as SEO-driven websites, immersive augmented reality or a team skilled in another stack.
Set up a Flutter workflow with Android Studio, Visual Studio Code or IntelliJ IDEA plugins, DartPad and Flutter DevTools.
Use production examples such as Google Pay, Toyota, ByteDance and BMW when building a technology case for Flutter.
Key takeaways from the speaker
What? - Flutter is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, desktop, and embedded devices from a single codebase.
Why? - Flutter can be considered as a choice of technology by the vast majority of businesses because of its ease, various platforms support, development speed, and platform adaptivity.
How? - Flutter development can be done on any OS, with a rich set of tools. Resources for getting started are provided.
Where? - Flutter is already used in a lot of products both inside and outside Google: Google Stadia, Google Pay, ByteDance, Alibaba Group apps, eBay Motors, Toyota cars, etc.
Details
Level
Beginner
Format
Talk
Technical depth
Introductory technical
For
Early career, Mid-career, Senior individual contributor
Length
19:42
Published
June 2021
Questions this talk answers
How can a cross-platform framework like Flutter perform comparably to native apps?
Flutter bypasses the system UI widget libraries in favour of its own widget set, compiled to native code and rendered with Skia, so it composites the whole scene without switching back and forth between Flutter and platform code.
When might Flutter be the wrong choice?
Search engine optimised pages such as blogging platforms and deeply immersive augmented reality experiences are not its strong points, and a team whose strengths suit another cross-platform framework may be better retrained for that one.
What do you need to start developing with Flutter?
Any operating system and the Flutter SDK, ideally with Android Studio, Visual Studio Code or IntelliJ IDEA and the Dart and Flutter plugins, plus DartPad for online experiments and Flutter DevTools for debugging and profiling.
Where should an experienced mobile developer begin learning Flutter?
The Flutter documentation has a section mapping concepts from Android, iOS, React Native, Xamarin and web development to their Flutter equivalents, which was Anna's own first resource when switching from Xamarin.
What results did Google Pay see after moving to Flutter?
As the speaker cited, Google Pay ended up with a 35% smaller codebase, engineers 20% more productive on new features and tech debt down 90% per engineer, along with merged release, experimentation and security review processes.
About this talk
What is common between BMW, Alibaba Group, Google, Toyota, Square, and eBay? - They all have products created with Flutter. In fact, there are already over 200K applications on Google Play alone created with this beautiful, fast, productive, open, and portable framework.
We’ll talk about what Flutter is, why you should consider it as a technology choice in your company (or why not), and how you can start incorporating it into your projects.
Why Flutter is fast when other cross-platform tools are not (88 s)
When you should not choose Flutter (54 s)
How Google Pay cut its codebase 35% with Flutter (87 s)
Hello, everyone. I'm Anna Domashych. I'm a mobile development expert specializing in cross-platform frameworks like Xamarin and Flutter. I'm also a Google developer expert in Dart and Flutter. Currently, I work as a senior mobile engineer at Team Go. And today I'm talking about this technology, Flutter. As you might have get from the talk title, we are going to address several specific questions. What Flutter is? Why you should consider it as a technology choice in your company? Or why not? How you can start incorporating it into your projects? And look at the companies where it is already successfully applied.
But first, I'd like you to meet Dash. Dash is a mascot for the Flutter framework and the Dart framework, which is used in Flutter development. Today Dash will show us some style and will help me answer these questions. Oh, and just in case, if it wasn't clear from the first glance, Dash is a hummingbird. So let's start from the beginning. What is Flutter?
According to the Flutter Dev website, Flutter is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, desktop and embedded devices from a single code base. What does it mean? Flutter SDK is a modern React style framework, which includes a rich set of UI components implementing material design and iOS Cupertino styles and heavily optimized mobile first 2D rendering engine.
To the underlying operating system. Flutter applications are packaged in the same way as any other native application. They are compiled to 32-bit and 64-bit ARM machine code for iOS and Android, JavaScript for the web and Intel X64 for desktop devices. Flutter apps run on this variety of platforms with little or no change to a single code base using a single programming language. Dart.
And finally, Flutter is a Google's product, although Google is not the only one contributing to it. What makes Flutter so special? And if Flutter is a cross-platform framework, then how can it offer a comparable to native apps performance? Well, cross-platform frameworks typically work by creating an abstraction layer over the underlying native UI libraries, struggling to work around inconsistencies of each platform representation.
The app code is written in one language, which then interacts with the native system libraries written with another language to display UI. This adds an overhead when there is a lot of interaction between UI and the app logic. By contrast, Flutter minimizes those abstractions by passing the system UI widget libraries in favor of its own widget set.
This approach has several benefits. It avoids a significant performance bottleneck by allowing Flutter to composite the entire scene at once without transitioning back and forth between Flutter code and the platform code. It decouples the application behavior from any operating system dependencies. The application looks and feels the same on all versions of the operating system, even if it changes the implementation of its controls.
And it provides unlimited extensibility. This way, designers and developers can create expressive and flexible UI where nothing limits their imagination. I hope it's not clear and how it is unique. And we are now ready to move on to our next question. Why you should consider it as a technology choice in your company? Well, I have at least five reasons for you.
Flutter allows building beautiful UI. As I mentioned, Flutter has its own implementations of each UI control rather than using those provided by the system. For example, there is a pure Dart implementation of both the iOS switch control and the Android equivalent. And actually any variant of the switch control can be created as developers are not limited to the extension points provided by the operating system.
At the same time, Flutter has platform-specific adaptations where it is required, like scrolling physics, text editing, typography or page navigation. Flutter is fast. It is architected to support glitch-free, jank-free graphics at the native speed of the device. It is powered by Skia, the same hardware accelerator 2D graphics library that supports Chrome and Android. The Dart code that paints Flutter visuals is compiled into native code, which uses Skia for rendering.
As I've explained previously, Flutter user interfaces are built, laid out, composited and painted by Flutter itself. Flutter performs one layout operation per frame. During layout, the only information that flows from parent to child are the constraints. And the only information that flows from child to parent is the geometry. This way, layout algorithm works in the single path.
There are also optimizations aiming to process only the part of the screen that needs it, ensuring that only dirty UI elements and a limited part of the subtree around them are visited during layout. Flutter is portable. Traditionally, when building apps, the first decision you have to make is where my app is going to run. With Flutter, you can start with experience you want to create and then ship it to any device you want to target.
Here is how it is achieved. This is a simplified schema of Flutter architectural layers. Typically, developers interact with Flutter framework. It is a reactive UI framework providing a rich set of widgets, layouts and foundational libraries. Flutter engine is a core which supports lowest level primitives necessary for all Flutter applications, including input, graphics, text rendering subsystems. The engine is platform agnostic, presenting a stable application binary interface that provides a platform embedder with a way to set up and use Flutter.
And finally, the platform embedder is a native OS application that acts as a glue between Flutter and the host operating system. Flutter SDK already includes platform embedders for Android, iOS, Windows, macOS and Linux. And it's also possible to create a custom platform embedder like Toyota did for their cars infotainment system. Also, using the embedder, Flutter code can be integrated into an existing native mobile application with a feature called Add to App.
Flutter is productive. One of the Flutter's main advantage is that it saves engineering resources by letting developers create apps for all these platforms with the same code base. Also, Flutter development experience is great. The majority of the Flutter framework itself is built with the same language that we, its users, work with - Dart. So, there is no need for switching when you want to check out the framework or the widgets implementation.
Flutter offers stateful hot reload for mobile and desktop applications, allowing developers to make changes to the code and see the results instantly. Without needing a full recompile, restarting the app or losing its state. This means developers can quickly iterate on a screen deeply nested in the app, without starting from the home screen after every reload. Flutter comes with visual, behavioral and motion-rich widgets implementing material design guidelines.
So, designers and Flutter developers can speak the same language. And finally, Flutter is open-sourced. While Google is the primary contributor, a broader ecosystem grows around Flutter. Toyota, Canonical, Sony, Samsung, Microsoft Surface team are contributing to a greater user experience on their platforms and devices. Flutter has a massive community support, with thousands of contributors adding to the core framework and extending the packages ecosystem.
There are now over 15,000 packages for Flutter and Dart from big companies like Amazon, Adobe, Huawei, Alibaba, eBay and Square. Individual developers. To recap, Flutter is beautiful, fast, portable, productive and open-sourced. I hope I have managed to wake up some curiosity to the framework. And you'll add Flutter to the list of options for your next project. Or will consider it as a technology choice for the next iteration of an existing product.
Now, a few words on why you may want to choose another framework. For example, not every web page would make sense in Flutter. It is perfectly suited for up-centric experiences like progressive web apps. Search engine-optimized pages like blogging platforms is not a strong Flutter's point for now. Or if you are building a deeply immersive augmented reality experience.
I'm not saying it is impossible in Flutter, but using it won't be as beneficial as for other products. Also, you should look at your current team experience and strengths. If it makes more sense to re-qualify them for another cross-platform framework, go for it. All right, moving on to the next question for today. How exactly it is done?
Flutter development can be done on any operating system. Flutter SDK comes with command line tools, which allows development of Flutter apps in any text editor. But of course, having syntax highlights and concapletion makes development experience much more pleasant and productive. The most common approach is to use Android Studio, Visual Studio Code or IntelliJ IDEA with Dart and Flutter plugins.
And DartPad is an online code editor for Dart language. In addition to executing regular Dart programs, it can run Flutter programs and show graphic output. Flutter SDK also contains packages and tools for testing, debugging, and profiling apps. A suite of performance and debugging tools called Flutter DevTools is actually written in Flutter. So, where to start with Flutter development?
For someone who is already a mobile developer, Flutter documentation contains a great section explaining what are the Flutter equivalents of entities familiar for Android, iOS, React Native, Xamarin, and web developers. I remember this was the first Flutter resource I read when switching from Xamarin background. And for complete newbies, there are great Dart and Flutter videos, code labs, tutorials, and recommended courses.
Sounds encouraging to me. Now, I'd like to share a few examples of projects that are using Flutter. Overall, there are already over 200,000 apps using Flutter in the Google Play Store alone, like WeChat, MyBMW, and Grab. A recent mobile developer study shows that Flutter is now the most popular framework for cross-platform development, with 45% of developers selecting it.
In the last 30 days, more than one in eight of the new apps in the Play Store are built with Flutter. Within Google, Flutter is used in more than 30 teams and by over a thousand of engineers. These apps that you see here are already shipping using Flutter. One of the largest apps among them is Google Pay.
The product is implemented on two platforms, Android and iOS. Launched in over 30 countries, 150 million plus users monthly. It had two code bases of total 1.7 million lines. They faced feature disparity because features were implemented at a different rate. And TechDev accumulated twice faster. After weighing pros and cons, they have decided to rewrite everything using Flutter.
As a result, they ended up with 35% smaller code base. Engineers became 20% more productive in terms of new features implementation. And the TechDev went down 90% on a per-engineer basis. Because of the rewrite, they were also able to merge all the duplicate, release process, experimentation, the launch process and security reviews. And now, all engineers are working on the same code base, which gives engineering efficiency boost.
I am quoting the vice president of engineering for Google Pay. If I had to go back, I would absolutely make this decision all over again. And I would recommend it to any team that builds on multiple platforms. Another example is Toyota, the world's biggest selling automaker. Toyota is partnering with Flutter to bring a best-in-market digital experience to vehicles by building infotainment systems powered by Flutter.
According to the chief engineer at Toyota Motor North America, Flutter immediately caught their attention for a number of reasons. Flutter's rendering engine provides good performance in a constrained environment. And features like ahead of time compilation gives the consistency they've been looking for in an in-vehicle technology. Cross-platform touch mechanics feels right no matter where they run. Flutter developers experience.
Even though they target a single platform, they have leveraged the Flutter's advantage of multi-platform support. Desktop support with Hot Reload enabled fast development workflow. Support of mobile devices such as Android and iOS tablets was useful for all sorts of physical and digital user testing. And the web support improved feedback cycle with product designers. Using Flutter created a tighter overall field in their design and engineering processes.
Faster iteration cycles allowed to collect and integrate feedback earlier and more often, which helped create the best customer experience. Bydance, the company behind TikTok is using Flutter in more than 70 apps. Switching to Flutter has allowed them to ship new apps and features 30% faster. The Flutter development team at BMW Group is one of the world's largest after Google, bringing together a total of 300 employees.
At Nubank, they decided to use Flutter as a main technology for mobile development. They found Flutter development experience to be superior with better hot reload capabilities, very strong official documentation, and a more stable API. The Flutter development experience to be able to use Flutter. Have apps created with Flutter. You can check the Flutter Dev Showcase section for even more examples of successful Flutter applications.
And this was the last topic for today. To recap, we've talked about what is Flutter and how it is special. Why it might be worth giving it a chance in your product. How Flutter development is done and where to start. And so some examples of companies that already use Flutter in production. If you have any doubts about Flutter left, feel free to visit Flutter Dev website.
Especially the Showcase section. If you are a developer, check out its documentation, codelabs, and a guide to getting started. As well as videos and online courses. And if you simply like the cute dash transformations like we saw today. It's called Dashatar. And you can visit Dashatar Dev web app to create your own personalized dash. By the way, that website is implemented in your web framework.
If you are interested in an example of the quality of web apps that can be created with Flutter. Also, feel free to reach out and connect with me on LinkedIn or Twitter via Anna Domasic's handle. Happy Fluttering! Thank you.
Transcribed automatically; names checked against the speaker record. Select a time to jump there.
Article based on this talk
Should your team build its next app with Flutter?
Google Developer Expert Anna Domashych explains how Flutter works, when it shines, when it does not, and what companies like Google Pay and Toyota gained from it.
In short
Anna Domashych argues that Flutter deserves a place on the shortlist for most new app projects because it draws its own interface, compiles to native code and runs on mobile, web, desktop and embedded devices from one codebase. She is equally clear about its limits: SEO-heavy websites, deeply immersive augmented reality and teams better suited to another stack may be better served elsewhere.
Key takeaways
What? Flutter is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, desktop and embedded devices from a single codebase.
Why? Flutter can be considered as a technology choice by the vast majority of businesses because of its ease, support for various platforms, development speed and platform adaptivity.
How? Flutter development can be done on any operating system, with a rich set of tools. Resources for getting started are provided.
Where? Flutter is already used in many products both inside and outside Google, including Google Pay, ByteDance, Alibaba Group apps, eBay Motors and Toyota cars.
What Flutter is and why it behaves differently
Domashych, a Senior Mobile Engineer at Team Go, Inc., opens with the definition from the official site: "According to the Flutter Dev website, Flutter is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, desktop and embedded devices from a single code base." (1:19) Flutter apps are compiled to ARM machine code for iOS and Android, JavaScript for the web and x64 for desktop, all written in one language, Dart.
The interesting part is how Flutter can match native performance. Most cross-platform frameworks, she explains, build an abstraction layer over native UI libraries, which adds overhead whenever the interface and app logic talk to each other. Flutter instead ships its own widget set and composites the entire scene at once. That choice has a second benefit: "It decouples the application behavior from any operating system dependencies." (3:28) An app looks and feels the same on every version of the operating system, and designers are no longer limited by the controls a platform provides.
Five reasons to consider Flutter
Domashych offers five reasons. First, beautiful UI: Flutter implements controls such as the iOS and Android switches in pure Dart, while keeping platform adaptations for scrolling physics, text editing, typography and navigation. Second, speed: Flutter is powered by Skia, the same 2D graphics library behind Chrome and Android, and performs a single-pass layout that only revisits the parts of the screen that changed.
Third, portability. She walks through Flutter's layered architecture of framework, platform-agnostic engine and platform embedder, noting that Toyota built a custom embedder for its in-car infotainment system and that existing native apps can adopt Flutter screens through a feature called Add to App. Her framing of the shift is simple: "With Flutter, you can start with experience you want to create and then ship it to any device you want to target." (6:16)
Fourth, productivity. "One of the Flutter's main advantage is that it saves engineering resources by letting developers create apps for all these platforms with the same code base." (8:16) Stateful hot reload lets developers see changes instantly without losing app state, and Material Design widgets give designers and developers a shared language. Fifth, Flutter is open source, with contributions from Toyota, Canonical, Sony, Samsung and Microsoft's Surface team, and, as she cited, more than 15,000 packages for Flutter and Dart.
When another framework is the better call
Domashych does not oversell. Flutter suits app-centric experiences such as progressive web apps, but search engine optimised pages like blogging platforms are not its strength today, and neither are deeply immersive augmented reality experiences. "I'm not saying it is impossible in Flutter, but using it won't be as beneficial as for other products." (11:15) Team skills matter too: "Also, you should look at your current team experience and strengths. If it makes more sense to re-qualify them for another cross-platform framework, go for it." (11:15)
How to get started
Flutter development works on any operating system. The SDK's command line tools run with any editor, but most developers use Android Studio, Visual Studio Code or IntelliJ IDEA with the Dart and Flutter plugins. DartPad runs Dart and Flutter programs in the browser, and the Flutter DevTools suite for debugging and profiling is itself written in Flutter. For experienced mobile developers, the documentation maps familiar Android, iOS, React Native, Xamarin and web concepts to Flutter equivalents. "I remember this was the first Flutter resource I read when switching from Xamarin background." (12:45) Newcomers can start with videos, codelabs, tutorials and recommended courses.
Where Flutter is already in production
As the speaker cited, more than 200,000 apps on Google Play use Flutter, a recent mobile developer study found 45% of developers choosing it for cross-platform work, and over a thousand Google engineers across more than 30 teams use it. Her headline case is Google Pay, which had two codebases totalling 1.7 million lines and suffered feature disparity. After the rewrite, she reports, the codebase was 35% smaller, engineers were 20% more productive on new features and tech debt fell 90% per engineer.
Toyota chose Flutter for infotainment because of its performance in constrained environments and its developer experience, using desktop, tablet and web builds to test with designers. "Faster iteration cycles allowed to collect and integrate feedback earlier and more often, which helped create the best customer experience." (17:10) She adds that ByteDance uses Flutter in more than 70 apps and ships 30% faster, BMW Group has a Flutter team of around 300 people, and Nubank made Flutter its main mobile technology.
Watch the talk
Flutter: What? Why? How? Where? by Anna Domashych (20 minutes): https://www.womentech.net/video/flutter-what-why-how-where
About the speaker
Anna Domashych is a Senior Mobile Engineer at Team Go, Inc. and a Google Developer Expert in Dart and Flutter. For seven years she has built cross-platform apps with Xamarin and Flutter, taking products from sketches on a napkin to functional, beautiful apps for happy end users.
Questions this talk answers
How can a cross-platform framework like Flutter perform comparably to native apps?
When might Flutter be the wrong choice?
What do you need to start developing with Flutter?
Where should an experienced mobile developer begin learning Flutter?
What results did Google Pay see after moving to Flutter?
Drafted with AI from the talk transcript. Editor review pending.
Frameworks and ideas mentioned
Material Design
Cupertino (iOS design style)
Resources mentioned
flutter.dev website and its Showcase section
Flutter documentation section for Android, iOS, React Native, Xamarin and web developers
Flutter codelabs, tutorials, videos and recommended courses
DartPad
Flutter DevTools
Android Studio, Visual Studio Code or IntelliJ IDEA with Dart and Flutter plugins