Accelerating app development with Flutter
Learn how eBay Motors created a quality app using Flutter — part of the Apps, Games, & Insights podcast
Authored by Larry Mckenzie and Corey Sprague, Tech leads at eBay. Hear them talk about building apps with Flutter on Google’s Apps, Games, & Insights podcast.
Building native apps can be tricky: building one in less than a year with a demanding target audience in mind, even trickier. This was the challenge we faced when building the eBay Motors app. However, with a little help from Google’s UI toolkit Flutter, we quickly delivered a high-quality, consistent experience for Android and iOS.
eBay Motors
eBay has had a vibrant motors marketplace for over 10 years. However, a couple of years ago, our leadership saw an opportunity for a dedicated experience built specifically for buying and selling vehicles on eBay. Buying a vehicle is different from most online shopping: it’s one of the larger purchases people make, and there are unique considerations for the sale process. eBay tends to attract unique inventory: classic or rare models, vehicles that have been modified, and sellers who are looking for someone who’s going to love their car as they have. Many eBay buyers and sellers are looking for something more personal, more unique, and we wanted to build a special app for those people — so the idea for the eBay Motors app was born.
Target audience
eBay Motors’ target audience is auto enthusiasts. However, despite being a daily hobby, these people may only buy a vehicle every few years. So the challenge was to create an app that they would use regularly. The team focused on understanding these people’s motivations and how they want to engage with other auto enthusiasts.
Buyers might be looking for their next project vehicle, or they could just be window shopping or looking for inspiration. When considering a vehicle purchase, a buyer wants to have confidence in a potential purchase. They want to see the vehicle from every angle — interior, exterior, the engine, the drive train. They want to understand both the vehicle and the seller. How does the current owner use the vehicle? Do they drive it every day? Is it kept in a garage and polished? Is it driven once a year and only brought to autocar shows? We wanted to build an experience that could meet these needs.
As the team talked to people about selling their cars, it became apparent that sellers care a lot about who they’re selling to; it’s not always about price. Some sellers said they would take a lower price if they felt the buyer would care for it the way they wanted. This attitude is very different from a traditional vehicle marketplace, where sellers are always looking to get the most money for their car.
In the research, people didn’t see the sale as the end of the relationship between the buyer and seller. Sellers wanted to check back in on the car and continue talking to the people they sold it to. Buyers also wanted to keep in touch, to be able to ask, “Hey, I was looking at making this change, but I saw you did these other changes. Can you tell me about it?” As a result we wanted to build features that would enable people to create a community that goes beyond the transaction.
Selecting Flutter
eBay Motors’ leadership gave the team a lot of autonomy in creating this app. There was one fixed requirement: the app had to be ready within a year. From our research it was clear that the app had to include all the features that eBay users have come to expect: detailed listings, auctions, messaging, searching and more. The team was also keen to add features to foster an enthusiastic community. This meant our scope was very large and we did not think we could meet our deadlines working as two separate platform teams.
There was a clear need for a new approach for developing the app. The team had previously undertaken some evaluation of cross-platform development tools but hadn’t been impressed by the results which emerged.
However, starting on this project, Flutter 1.0 was released. Flutter is Google’s UI toolkit for building attractive, natively compiled apps for mobile, web and desktop from a single codebase. This looked very promising , so our team started a more detailed investigation.
Putting Flutter through a thorough evaluation and were impressed. Within a few weeks, the team were confident that Flutter was the best choice for this app.
eBay Motors’ had two development teams with different ways of working, working arrangements and styles of programming. When deciding to go with Flutter, it was important to figure out how to align the teams. There was a tight timeline, so it was key that the teams agreed with how to build the app. Everyone had the same goal — to create a high quality product, deliver it quickly and exceed expectations.
Both teams met to work out any differences, and although each made compromises, the end result was very aligned and set up for success.
None of the teams had any experience with Flutter or Dart but with the guardrails which were put in place for our team, it proved straightforward to learn.
The first build
The first product requirements were received in March 2019 — we needed to produce a beta of our app with a working buying and selling experience in our CEO’s hands within three months.
This first deadline forced the team to make aggressive scope cutting decisions. Even with Flutter we knew it wasn’t possible to solve all the problems at once — we couldn’t build the entire community and refresh messaging, with all of the buying and selling features. It was important to prioritize our features strategically rather than working on them all at once. Conversations about what scope to cut actually created a lot of focus for the team. This focused our research, which then focused our development. Each subtle change unlocked the next, ultimately enabling us to rally around our milestones. We swarmed on problems, focusing on solving very specific issues that our users wanted us to solve. This difficult and sometimes messy process combined with the sheer speed of Flutter development accelerated us to the point we were able to hit the deadlines in ways that we didn’t expect. Every time we did that, it energized the team.
Many milestones came after that first one and with Flutter we were able to solve problems once and move on. We went from the beta in our CEO’s hands to an internal eBay-wide beta with thousands of eBayers using the app. A month later, we went to a public beta. Then, we had iOS and Android live in the marketplaces by December 2019.
Each of those moments was huge for eBay Motors. It built the team’s confidence. We got to learn along the way: we put it in new user’s hands, we got feedback, and made corrections and adjustments. Quickly delivering small iterations to drive towards a goal helped our product team succeed. Flutter allowed us to continue to rapidly deliver, even as the app grew in both scope and complexity.
With the aggressive approach to scoping taken on the launch, it meant we didn’t have a chat experience or community. So, in January 2020, the team started building our community from scratch, and during those months after launch we added 50% of the app experience.
Impact of Flutter
When we adopted Flutter, we looked at it as an engineering tool that would enable us to share code and save time. However, Flutter solved many problems that the team didn’t expect it to solve; in some cases, it solved problems we didn’t even know we had.
We wanted to make sure that the user interface was unified across platforms: with the experience focused on the eBay Motors brand, rather than catering to specific platform’s design languages. However, it was necessary to maintain certain platform behaviors, such as scroll physics and navigation mechanics. Thankfully, Flutter solved these problems out of the box. This meant that the designer could eliminate a lot of work as they only needed to produce a single, platform agnostic design.
When it came to product requirements, we didn’t want divergence between platforms. By having a single implementation of each requirement, overhead started to melt away. We had fewer meetings and expended much less effort to achieve the same outcome.
As the team gained more understanding of Flutter, it was clear that the code-sharing was phenomenal. In our codebase, we’re sharing 98.6% of the code across Android and iOS. We have about 0.5% that is platform specific native code. The remainder consists of our CI pipeline, automation tooling and developer support.
While there were tremendous savings during development from sharing the code, there were also savings from a testing perspective. Flutter has one of the best testing stories of any platform the team has worked with. This testing capability has helped us move very quickly and gain confidence as we release. We adopted a policy of enforcing 100% code coverage from the beginning, and Flutter has made it easy to achieve this goal.
The savings have also continued now that the app is in production. Support has been much more predictable as we don’t have to deal with separate iOS or Android bugs. The team are able to push new releases out to the more forgiving Android beta channel, and are confident that the iOS release will be smooth. The ability to realize so many savings is effectively due to only having to build and support one app.
Tips for getting started with Flutter
To get started with Flutter, it’s important to shed any preconceived notions about how you solve certain problems in a mobile app because the paradigms used are very different from traditional iOS and Android. Once you realized the need to embrace how Flutter wants you to build apps, everything is smoother. The best way to do that is to spend some time studying the Flutter codebase.
One of the great things about Flutter is that it’s open-source. You can go in and look at how the Flutter team built every component. There’s a lot of value that can be gleaned from that.
The Flutter community is also very active and engaged. If you need a solution that’s not provided by the Flutter framework, chances are someone has built a package to provide it. Encourage your team to explore and find what they need, or contribute back and embrace the open-source culture.
The Future of Flutter
When eBay Motors’ started using Flutter, few large companies were publicly using it: it seemed like a niche toolkit and, perhaps, a little unproven. Now there is momentum across the board, and other companies are embracing it. That’s exciting because Flutter offers the most modern and best app development experience available. The best part is that it is constantly growing and improving.
As Flutter has grown, there’s been a lot of investment into Dart. A lot of effort has been made to bring some of the must-have features from Swift and Kotlin, such as the addition of null safety. We’re very excited about the continual growth and what that enables for building Flutter apps. As companies, both big and small, realize that Flutter can provide them a desktop, web and mobile app all from a single codebase, we will have even more adoption of Flutter.
Final words
Everyone on our team at eBay Motors’ came from a background of either native iOS or native Android development. Unanimously, everyone loves Flutter so much more. The developer experience is much better; it’s much more rewarding to get rapid feedback as you’re coding from hot reload and to be able to solve problems quickly because there’s so much less friction in the process. There’s still that excitement two years in; it’s not uncommon to hear a teammate exclaim, “I love Flutter. I just found a new trick.”
With a team of our size, we couldn’t have developed the eBay Motors app if we had not chosen Flutter. It enables us to pool our resources in a way that wouldn’t have been possible if we had built two separate apps. Flutter is the grease that helps us accelerate.
Find out more
Hear Larry Mckenzie and Corey Sprague talk about building apps with Flutter episode 16 of the Apps, Games, & Insights podcast. Look out for upcoming articles from other episodes in our podcast series.
What do you think?
Do you have thoughts on building apps with Flutter? Let us know in the comments below or tweet using #AskPlayDev and we’ll reply from @GooglePlayDev, where we regularly share news and tips on how to be successful on Google Play.