My First Merged Flutter Plugins Pull Request

Jun 30, 2021

This story started with some Track My Indoor Workout users mentioning to me that the help button of my application wasn’t working. You need to know that the help button opens up the Quick Start section of the app’s website, so I don’t need to package a bunch of documentation along with the application. This way I have the freedom to adjust the documentation without the need for a new app store release cycle. I’m utilizing the url_launcher plugin to open up a browser with a URL. That plugin is part of the curated set of Flutter-maintained plugins.

After some analysis of the situation, I realized that the problem only affected users with Android 11 and above, and I could reproduce the problem on a Pixel 3 (at that time my daily driver was a OnePlus 6 with Android 10). I started looking through issues in the plugin source code repository, and I saw that some developers had already run into similar problems. Then I happened to glance at the code documentation of the canLaunch function which mentioned a required visibility configuration along with Android API 30. This pointed towards the root cause of the issue. But I realized that besides a somewhat vague pointer in this documentation, at least the example application could have included the supported queries, and the README could have addressed it in a little more detail.

My thinking was that as Android 11 gained more market share, more duplicate tickets would pop up that would need to be handled. It’s better to show concrete examples to avoid unnecessary management work in the future. So I scooped up the earlier scavenged squashed issues about the problem and filed a new issue which called for addressing the query intent in the README, including it in the example app’s AndroidManifest.xml, and providing better code documentation as well. I crafted the first corresponding pull request on May 21st. We went through a few iterations with the Flutter team, but on the 28th, my fork refresh triggered a CLA violation and the PR got unruly.

On June 2nd, I decided to ditch that PR and just start from scratch with a clean new PR. This went through a few extra iterations as well. I’m very pleased with the helpfulness and openness of the Flutter team. I’m also pleased with how thorough they are. After some iterations, I started to collide with version number bumps, so I needed to adjust my PR several times, and refreshing my branch from upstream resulted in a conflict. But I cleared the hurdles and on June 30th, my PR got merged! I’m super happy about this. I’m using url_launcher the same way (shuttling the user to a website) in multiple Flutter projects. I’m hopeful my contribution will help other developers.

More good news is that I got an amortized Early 2014 13” MacBook Air. I already upgraded it from macOS High Sierra to Big Sur and also installed Xcode. Boy, I thought Visual Studio was a large install compared to Visual Studio Code. Not quite: Xcode is more than 12 GIGABYTES! Big Sur was that big (nomen est omen) as well. Anyway, the bottom line is that I’ll finally try to build an iOS version of the Track My Indoor Workout. Stay tuned for a tutorial video within a few days; I already developed the script and recorded the screen, but I still have to do the narration.

Comments loading...