What We Learned About Flutter by Analyzing CI/CD Builds
What We Learned About Flutter by Analyzing CI/CD Builds
Flutter is Google's new mobile SDK — see what we can learn about its testing, build time, and more from looking at CI.
Join the DZone community and get the full member experience.Join For Free
Flutter is Google’s mobile SDK, introduced in 2017, and is expected to release a stable version soon. The rising popularity of Flutter is illustrated by more than 40k GitHub stars and more than 15k StackOverflow questions.
In September, we offered a special deal for early adopters — FREE CI/CD for Flutter projects in exchange for product feedback. The campaign was more successful than we could have ever expected, and we are thankful to all the Flutter enthusiasts who are helping us to build a kick-ass CI/CD service for Flutter projects.
The campaign resulted in a respectable number of builds (1684) in just one short month. That’s one hell of a result for a mobile SDK still in beta. With Google’s Flutter Live event around the corner, we decided to share our findings.
Flutter From a Developer’s Perspective
As mentioned, our FREE CI/CD for Flutter was a game changer. This campaign proved that developers are keeping an eye out on the newcomer. Building beautiful native mobile apps from a single code base is more than desirable. Before digging into the data, let’s see what mobile app developers are saying about Flutter in their own words.
“I believe in future success of Flutter as a cross-platform development tool. So my learning of Flutter is an investment for the future.”
“Money is not my incentive to user Flutter, but it is actually saving my time in development and just because of it I will be able to focus on the other stuff so indirectly I am able to get some incentives in terms of money.”
“Yeah the power of Flutter is crazy, it’s helpful for every developer and I’m so enthusiastic for the future. And now the community is growing.”
“Flutter makes it easy to create cross-platform apps at a much faster pace through features like Hot Reload.”
“Flutter has proved to be performative and very productive SDK, it brought to mobile developers the feeling of being modern, productive and powerful because of many useful features such as Hot Reload, the less amount of code needed compared with native, no XML or Storyboard.”
Flutter & Continuous Integration
Continuous integration (CI) is a software development practice of merging developer build copies daily, if not multiple times a day, into a shared code repository. Each integration is verified by an automated build to detect errors and get to the root of the problem as soon as possible without losing track of the development process.
That said, it’s clear that implementing CI into your Flutter development process is crucial. Let’s see how Flutter developers see it.
“CI for Flutter is even more important than in native development, as there are two different platforms that need to be supported and distributing on both is totally different”
“As Flutter is so fast for the developers to get the app done, the packaging and releasing should be as easy and fast. So for me, CI is very much important for as a Mobile Developer.”
“Continuous Integration is very important because it’s one of the big improvements over react native and we all know now every strong project requires CI/CD”
“CI would improve my productivity as without it I should check everything manually (for example that my project is compatible with the latest version of Flutter)”
“It’s just we don’t want to do any manual work to build apk/ipa and push them to the stores – we want to focus on delivering features. Also it’s important to release fast to make sure that testers use latest builds and not double reporting already fixed issues. And clients are happy to see progress more often. Later on we plan to add tests and we need to make sure that we have a CI in place to leverage on having them”
“The main benefit for me (in using CI/CD for my Flutter projects) is the transparency in a project between each team member”
“CI provides a faster feedback loop, therefore its importance is fundamental”
“[CI] It’s crucial to Flutter development. The whole idea behind Flutter is a quick turnaround and agile teams with features like hot reload and restart. CI ensures “order in the chaos”.”
Now, let’s continue with Flutter in numbers.
Flutter & Hosting Services
Where do Flutter app developers like to keep their repositories?
Similar to our previous analysis on all CI/CD builds, we can see that the most popular Git solution for repository hosting is GitHub with 51%, followed by Bitbucket with 27%. About 22% of Flutter developers are using GitLab to host their source code.
Popular hosting services.
For what platforms are Flutter developers building their apps?
Flutter’s User Experience Research team conducted an online survey and found that the majority of Flutter developers have a background in Android development ( 67%), followed by Web (45%) and iOS (30%). This clearly demonstrates that developers with different backgrounds see the benefits of building beautiful native apps from a single code base.
Analyzing our Flutter early adopters, we can see that the majority of developers (82%) are indeed using Flutter for building both iOS and Android apps. However, for whatever reasons, there is a relatively big number of Flutter developers who are developing for a single platform only. About 15% of Flutter developers are developing only for Android and 3% only for iOS. It’s possible that these are the users that are taking Flutter for a test spin and do not have a serious Flutter app in production…yet.
Which version of Flutter are developers using?
As expected, the majority of Flutter app developers are using the latest version of Flutter, which was presented at the Flutter Release Preview 2 in Shanghai in September.
“This release continues the work of completing core scenarios and improving quality, beginning with our initial beta release in February through to the availability of our first Release Preview earlier this summer," Flutter's team said."The team is now fully focused on completing our 1.0 release.”
Testing Flutter Apps
What kind of tests are Flutter developers using?
Testing is an integral part of building a healthy app, and this is the case also with Flutter. Testing can save you a lot of money and time that would be otherwise spent on debugging, not to mention that releasing a buggy app may result in humiliation and angry customers.
Our analysis revealed that the majority of Flutter developers are not doing any testing and only 15% of Flutter projects on Nevercode servers are built with tests. This lends further support to the suggestion that developers are eager to try out Flutter, but as it’s still a relatively young development platform, not too many developers have a production-ready app.
Testing Flutter apps.
Time to Resolve Issues
This leads us to the next point. As we can see from our research, there’s always some room for human error that makes the build fail. However, this is not a bad thing! This means that you have not delivered a buggy app and continuous integration has saved you from stress and public humiliation.
The average time to resolve Flutter issues is 14 minutes, which is pretty damn good. In comparison with other platforms, resolving Flutter issues takes slightly longer. However, this is understandable, considering that Flutter is a new platform and its community is still growing. Having unique issues that might not have an existing solution on StackOverflow is common. In addition, it’s likely that apps that are not in production yet or are side projects do not get the priority attention that production apps do.
Time to resolve issues.
Flutter & Integrations
What are the top integrations that Flutter app developers love to match with their continuous integration service?
- Email 20%
- Google play 12%
- Slack 4%
- Itunes 4%
- Hockeyapp 3%
- Crashlytics 1%
The main value of Flutter is getting beautiful native apps in record time. As a matter of fact, Steel Kiwi has estimated that building a Flutter app for both iOS and Android takes 250 hours while building the same app with native tools takes 250 hours for Android and 400 hours for iOS. It’s hard to argue with these numbers.
Time is money. And the point of CI/CD is to save you time and money. Let’s see how much time CI/CD is saving for Flutter projects.
Our analysis of Flutter builds shows that half of the Flutter apps are built in 10 minutes or less. This means that it takes about 10 minutes from pushing new code to getting the build status report and artifacts for both Android and iOS, which is fast! Build, test and deliver your Flutter apps in record time.
However, there will always be projects that pull down the average build time. With Flutter projects, we can see that a lot of builds take up to 40 minutes to finish, resulting in the average build time of 15 minutes. Thanks to our CI/CD for Flutter beta testers, we have valuable feedback on how to boost the average build time. We will keep you updated!
Flutter build time.
Some final comments about Nevercode CI from our Flutter enthusiasts that we absolutely love:
“Generally really intuitive and I dare say it moron proof!”
“Time to initial build was insanely quick, I was very happy with how that worked. It did take a little digging around to figure out how I could only run my main build pipeline for tagged commits on the master branch, but I think I’ve got that working so far.”
“It’s so simple and minimal. In fact at first it felt too simple. I’m used to have so many tabs and options, it took me a few minutes to navigate around looking for what I needed. But definitely nothing to complain about, I actually appreciate the simplicity”
What Can We Conclude From Our Findings?
The analysis of Flutter builds on Nevercode servers revealed that Flutter is a strong player among other mobile app development platforms and that developers consider learning it worth the effort. The fact that developers have set up a continuous integration and delivery pipeline with various integrations for their Flutter project also signals that they are serious about Flutter.
However, more than three-quarters of Flutter builds did not include any tests and the average time to resolve issues is longer compared to other platforms. Combining this with the data on team size and publishing habits, we can infer that many Flutter developers are enthusiasts who are trying out Flutter for their side project and don’t yet have the app ready for production.
Flutter has entered the stage with a big bang. Within two short years, it has developed into a mature mobile app development platform that developers seem to love. Based on our initial experience with Flutter projects, we can say that developers are definitely serious about Flutter and we will be excited to see more Flutter apps getting released for production in the near future.
Published at DZone with permission of Bojana Ilic . See the original article here.
Opinions expressed by DZone contributors are their own.