How my first PR landed in the flutter repo? | Adopt A Widget

How my first PR landed in the flutter repo? | Adopt A Widget

Start contributing to flutter today!

Adopt a widget is the program which was held in the month of November 2020. A special invitation from flutter team to contribute to the Flutter project by choosing a Widget and improving its API documentation.

This blog shows the work I did for my assigned widget and a few pro tips for you to get started. All of the resulting source code is in GitHub repositories, and you can see how the work progressed by looking pull request (PR).

Getting started

There were a bunch of issues created with the tag “Adopt a widget” and I picked the widget Aspect Ratio.

We have three tasks to do writing example code (either a snippet, sample, or DartPad), Adding references(see also section) and Adding more explanation to the documentation.

Experience

It’s always my wish to contribute to the flutter repo but don’t know where to start? how to start? Adopt a widget made it simple for me, It boosted my confidence and made me a part time student and a full time open source contributor.

Have a look at updated Aspect Ratio documentation.

Challenges involved

In my flutter development journey I often used grid view widget with a property aspect ratio. But actually talking about A class which attempts to size the child to a specific aspect ratio is another thing. So I dug a little bit, read some of the blogs and kudos to the flutter team for coming up with ‘Widget of the weak’ playlist. A very detailed video is available on AspectRatio.

Where should I actually write the code ?

Here is a trick, Head over to the specific widget you wanna contribute in the flutter docs. there you will find a doc icon, So flutter dev’s smash that icon button and olla you are in the flutters GitHub repo where exactly the code is written and the documentation too. Grab that path, navigate in your text editor and do some brainstorm .

Mentorship

Shi-Hao was everything I could ask for in a mentor. He reviewed my PR , left some comments on the thread improving documentation and nits.

He messaged me on discord asking for If I needed some help. Yes, that level of openness! to be very frank this wouldn’t be possible without the amazing Flutter team who is always there to help you, specially Shi Hao Hong he has always mentored me like no one before.

And yes you guys!, don’t hesitate asking for help, Everyone is happy to help you out! Just ask :)

Why am I writing this article?

Have you ever seen a typo in the flutter docs, and wished someone would fix it? you can do just that. Open source helps people feel agency over their lives and how they experience the world, and that in itself is gratifying. It’s always rewarding no matter how small or big a contribution is.

I just wanna thank you for the contribution you are going to make in the next few days. And don’t wait for the next Adopt a widget, start by today. Tag me as well on your successful PR, Always happy to celebrate your contribution.

Happy Fluttering!

About the author: Amit is an undergraduate student who is passionate about developing Mobile and web apps in Flutter. You can connect with him on Twitter, LinkedIn, and GitHub.