Why I'll Love Flutter Next Year

Nic Hartley - Jan 17 '19 - - Dev Community

If you've used Flutter a little, you're probably overjoyed with it. A cross-platform mobile development suite? Which actually works cross-platform, with no platform-specific configuration? Hot restart and stateful hot reload, so you can test changes in seconds? No need to mess with platform-specific configuration files? All of your layout is done in the language itself?!

All in all, it seems like a perfect thing. The hot-reload and hot-restart especially make Flutter hard not to love. I really can't put in words how useful it is to wait seconds, not minutes, to see your changes on your device.

The more you use Flutter, though, the more that initial warmth seeps away, replaced by the cold realization that it has its limitations, like anything else.

Among those is sending notifications. If you're building an entirely offline app -- in my case, a mobile game -- then it's not easy to get notifications working. Sure, you could go through FCM (since GCM is phasing out in April this year in favor of it), but that would require me to do a round-trip between a server just to send a notification from an app on the device to the device, or at least bundle that capability in when I don't need or want it.

So how do you do offline notifications in Flutter?

The short answer is that you can't. You can, of course, call out to native code, but the point of Flutter is to avoid writing native code yourself, and let Flutter handle it automagically. Instead, you have to look for third-party libraries which sort of work, except that you can't schedule or group notifications. (Maybe you can, but I couldn't get it to work.)

That kind of little thing is all over Flutter. For example, when it comes time to make a release for your app -- or even give it a pretty icon -- you need to do platform specific things (which, let's be fair, can be automated) to get that done. It'd be easy to make a lot of that platform-independent -- static icons could be generated from a single high-res file, like what flutter_launcher_icons does; permissions could come from a list in pubspec.yaml or even code analysis.

None of this is to say Flutter is bad. It's new. It's barely two years old, and when you're building something as complex as an entirely new way to develop cross-platform mobile apps, some early stumbling is to be expected. It has a ton of promise, and I think they're quickly getting to where they should be, but they're not there yet.

In short, I'll love Flutter a lot more next year.

. . . . . . .
Terabox Video Player