DEV Community 👩‍💻👨‍💻

Nic Hartley
Nic Hartley

Posted on

Why I'll Love Flutter Next Year

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.

Top comments (2)

mathieujobin profile image
Mathieu Jobin

not every module exists yet. but they just need to be created. if you know how to do it natively for Android and iOS, and no one ever done it. its easy to package this knowledge in a nice Flutter API. There are full of examples out there. but yeah sure, next year and every year after there will be more of those...

nichartley profile image
Nic Hartley Author

Yup. Like I said, Flutter is just immature, not inherently bad -- next year, when it has all of those packages created and thoroughly tested (or, better yet, integrated into Flutter itself) it'll be worth the effort to learn. For now, it's just not full-featured enough.

🌱 DEV runs on 100% open source code that we started called Forem.

You can contribute to the codebase or host your own.