Sheikh Asif Ali
Sheikh Asif Ali </>

My First Flutter Experience as a Native Android Dev! šŸš€

Originally published on medium.com

First a little background.

I have been developing native Android applications for quite some time now and had always heard of Flutter being the new framework in town for application development. Now, if you’re reading this, there’s a high chance you know what Flutter is, so I won’t be going into that. What I’ll do instead is explain how I, a native Android developer, feel about it. šŸ™‚

How I Started

Like always, I started reading the official Docs and supplemented it with a tutorial that covers the framework basics. This time, I chose something different: FreeCodeCamp’s Flutter Tutorial created by Vandad Nahavandipoor. One of the longest videos on FCC, yet filled with so much valuable content and such a great teacher. It’s a must watch, seriously.

What I Built?

After reading the docs and getting familiar with Flutter, I felt confident in my Flutter skills, knowing I could create basic apps with functionality and design. Then came an assignment from a company hiring Flutter developers. I thought it was a great challenge to test my skills, and this app is the result of that assignment. (video here)

Press enter or click to view image in full size

How I Built It?

It’s a very simple app. It fetches news from the NEWS API using the ā€˜Dio’ package and displays a list of the news. I also added a search bar to let users search for specific news articles. Sounds very simple, and it was to an extent but for a beginner like me, it was a great challenge which I accomplishedšŸ”Ž

Let’ s talk about the Pros…

Declarative UI: It’s a breath of fresh air! Coming from XML-based UI design, while XML wasn’t perfect, it got the job done. However, managing separate files for UI and logic often became hectic. In Flutter, you simply code what you want. While I haven’t used it extensively, it already feels great. šŸŽØ

The Packages: The variety of community-made packages is astonishing! As a developer, I can use these packages to simplify tasks. Native Android also has libraries, but Flutter has more variety, and adding them is super simple: just run flutter pub get package_name. šŸ“š

Cross-Platform: This one’s no secret: code for one platform, and it runs everywhere! I can run the app on my Android device, iOS, or even as a website on Chrome. Although I haven’t tried desktop (Windows/macOS/Linux) or embedded devices yet, it’s amazing to think a single change, like updating a button color, works across all platforms! Mind-blowing. 😱

ListView.builder: As someone who has implemented RecyclerView countless times in native Android, I can confidently say ListView.builder is a game-changer. It’s so much easier and cleaner to implement. And honestly, I don’t want to go back to RecyclerView ever again! šŸŽ‰

And the Cons…

The Setup: Maybe it’s just me, but I struggled to get everything set up properly. Despite having VS Code, Android Studio, Java SDK, Flutter, and everything else installed, I kept encountering errors. After reading numerous Stack Overflow posts and using AI assistance, I finally got it working. Adding Firebase was another challenge, but in the end, it works beautifully. šŸ˜…

Realtime Visual Updates: While Hot Reload is amazing and almost instantly updates the UI (seriously, how do they achieve that without rebuilding the app?!), I still miss the natural feel of XML. With XML, you can visually move views on-screen and then fine-tune them. In Flutter, especially as a beginner, you need to have a mental image of how widgets will interact. It hasn’t fully clicked for me yet, but I hope it gets easier with experience. 🌱

Conclusion!

So far I like it. With time who knows where flutter will be. With more experience I will get better at flutter and then maybe I will write an update to this one

Learn about Medium’s values

I’m still a beginner, so some of the things you might find as pros or cons aren’t mentioned here, or you may disagree with my take — and that’s okay! After all, this was my experience with Flutter, and yours could be different.

Feel free to correct me if I’m wrong somewhere, or share your own pros and cons in the comments. šŸ™Œ

✨Source code for the app.

This is my first time writing for Medium so I will really appreciative if you could tell if you like it.

You can contact me here…

šŸ“§ Email: contactsheikhasifali@gmail.com

šŸ”— LinkedIn

šŸ’» GitHub

🌐 Portfolio

Thanks for reading.