TL;DR .. IMO it’s great for an indie developer
First some background:
I’ve been developing Android and iOS apps for ~7 years. iOS has always been a hobby, whereas I’ve been a professional Android developer for ~5 years. I’ve always been anti cross platform, based on PhoneGap 🤮 and a brief play with React Native (not comparing the two).
Move forward to now:
I’ve been developing an app since January 2018, on and off. Which is now available, shameless plug:
It’s taken so long as I changed my mind many times, and had to write many Cloud Functions (my Node skills aren’t great). But, I got to the point where I was almost ready for release. I had iOS beta testers and I was testing the Android app.
Enter Flutter:
I’ve played with Flutter a little in the past, and liked it. I then did a proof of concept at work to see how I could develop an ongoing prototype with Flutter. I found I could develop fast, and across 2 platforms, so very fast.
The hot reload / hot restart feature made getting designs right easy, and fast.
The re-write:
What? From almost finished?
Yes, I questioned myself over this. But, I loved developing in Flutter. I could see that a re-write could save me a lot of time in the future. The we-write took a week and a half, but not without it’s challenges. Which I’ll go through now…
1: Dart / The Flutter layout system
I’d liken Dart to Java with a bit of Javascript. Try it out, its not as bad as I just painted. It’s a new language, with new features, and missing features. So this takes time. Next, the Flutter layout system. Everything’s a widget. I (personally) find the layout system great. Straight forward, but you can end up with indent-hell! if you don’t extract views out.
This took a while, and I’m sure not all of my layouts are as performant / simple as they could possibly be. Take a look at these for an idea. I’m a believer that once you do have a handle on it, its a great layout system.
2: Maps
The app uses Google Maps to draw routes. At present there is no Google Maps support in Flutter. I’d hope if Flutter continues to grow, this will change.
So I had to re-think the UX flow a little, and then (there was no good way around this) drop into Native. As I’d already written this screen on iOS and Android this wasn’t the hardest thing in the world. A copy, a paste, and a small refactor and it’s there.
When the user chooses to view this screen, flutter calls out to the AppDelegate
/ MainActivity
and a native view is shown on each platform.
3: Sharing
There are a few sharing libraries. One official, but can only share text, then a few others for images but each had it’s own limitations. So I had to write this part. I wanted to covert a view to an image to then share. After a bit of StackOverflow research I got the image. Then to pass it to the AppDelegate
/ MainActivity
to handle sharing. A little bit of work, converting to Base64 strings and back out… but again not too taxing.
4: Building / Distributing
On Android, this wasn’t really a problem. Just configure the build as normal, Gradle / keys etc. On iOS it took a while…
I wanted to distribute to Crashlytics, the Fabri mac app sits idle and waits for an IPA / Archive to appear. For some reason, it never saw the Flutter one :( so I ended up resorting to Fastlane. Fastlane is great, but I had hell on with Ruby versions, and getting the script to sign with the correct certificate. Again not too bad, and kind of something I expect when building iOS apps. I’ve been battling with Provisioning Profiles and Certificates for many years.
Conclusion
Is it for everyone? Will Google drop it? Will dart ever remove the semi-colon?
Dart is under quite active development, its missing some features. Lets hope it can grow towards Kotlin / Swift.
Google have a track record for binning products, Flutter seems to have legs though. The git repo is very active, 3rd party libraries are growing, and there is a not of buzz around it. Hopefully this is one thing that will not end up in the bin.
Is it for everybody?
No
In my opinion, native development is still the best. You’re in control, who knows if the next version of iOS breaks something inside Flutter… and we’ll have to wait for it to be fixed. There is the risk detailed above too, Flutter stops being developed.
For a big business, with a big budget. Maybe not. For a small (one-man-band) indie developer. Maybe. It works for me, and I think it’s going to get better still.
Give it a go, have a play.