brurberg.dev

Just another remote developer

Battle tested Flutter

About a year ago I wrote an article Flutter I don't hate it, and now after a year I would like to revisit that article.

2019-01-29 I wrote that article, and during the spring of 2019 I started to work more with Flutter and Dart, and later that summer I started to work more or less full time within the Flutter eco-system. I've put 2 apps into production, to later merge them together again. I've implemented crash analytics and have accumulated real world data from real world users.

So what do I work with? If you are new to my blogging, you might not know that I'm the only developer working on Chemical Manager for mobile. That is an application I work on for EcoOnline. If you would like to read more, you can read this.

Now, what do I think of Flutter after a year? I'll have to say, most of my inital impressions still stands πŸ˜… Dart have grown on me more over the time. I started out explaining my feelings for dart with this meme: Not home, but feel like it But now it feels more and more like home πŸ˜… I'm coming from JavaScript, and I guess that language will always stay close to my heart with all it quirks and "features". Dart on the other hand is... boring(?) not in a bad way tho. It feels like an iteration on JS, stripped down to the basics, added types and added some more safety features to the language πŸ‘€

The team working on Dart have also recently added extentions to the language, which reminds me of Swift (Another language I quite like) enabling you to extend classes at will! If you want some extra functionality on the String class you can just extend it! Just look at what Luke Pighetti does in this tweet

I haven't gotten around to do anything with extensions at work yet. Simply because I haven't found any good use-case for it yet πŸ™ˆ but it is cool to know I can extend stuff if I need to ✌🏼

But everything is not all great, and my biggest gripe probably is the greatest gift 🎁 to react native die hard fans! 3rd party packages... there are a lot of them, and a lot of them is quite good! But sometimes you find wired bugs in the most popular packages, and the developer seems to not care. In JS it is easier to just start a new search for another package that serves your purpose. But we don't have that many packages in flutter just yet, so you need to either report a bug to the developer, fork the repo and fix the issue or just develop your own implementation of that package.

I have done that once. I needed a package to download files, keep a reference to those files, and keep track of the download queue and the state of each item. I first went with flutter_downloader and got it to work. Buuuut I had some weird bugs, and figured it was something with the SQLite implantation on the native side of that plugin. I tried to fix it, but after a while I realized it would be way easier to just develop my own package. So I combined the power of SQFlite and Dio and created my own package for downloading stuff and provide custom headers and everything purely in dart! It was a nice feeling when I got everything to work, and it is nice to know that this runs on over 10k devices out there. But had this been react native I bet that I would not been in a situation where I needed to write my own implantation of what I think of as a pretty trivial plugin that downloads stuff from a URL and keeps track of said stuff πŸ˜…

But to conclude this post. I still like to work with flutter and dart 🎯 it is not new and shiny anymore, but it is now a tool I've become pretty effective with πŸ€“ I hope it will continue to grow (it has passed react native in the number of stars ⭐️ on GitHub πŸ™). And even if it dies at some point, I feel like my knowledge I've acquired by working with this framework is easily transferable to SwiftUI. After a year with flutter I've become a better developer, and I've become better at working with reactive frameworks! So... thanks I guess to the flutter team✌🏼

Β© 2021 Bror Brurberg All Rights Reserved