My First Merged Flutter Plugins Pull Request
Jun 30, 2021
This story started by 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 wouldn’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 of 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 native Flutter maintained curated set of plugins.
After some situation analysis I realized that the problem only affects users with Android 11 and above and I could reproduce the problem with a Pixel 3 (at that time my daily driver was a OnePlus 6 with Android 10). I started to scavenge around issues in the plugin source code repository and I saw that some developers already ran into similar problems. Then I accidentally glanced over 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 will get more market share more and more duplicate tickets will pop up which will need to be handled. It’s better to show concrete examples to avoid future extra management work. 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 into the example app’s AndroidManifest.xml and a little 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 28th my fork refresh triggered a CLA violation and the PR got unruly.
On Jun 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 the version number bump so I needed to adjust my PR several times and the refresh of my branch from upstream resulted in a conflict. But I scaled the hoops 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.
Another 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 is 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. Anyways, 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 have to narrate.