Live data from Hacker News

All you should know about Flutter development

github.com

11–20 of 101 posts

Re: All you should know about Flutter development

#11
post #6

I feel that Flutter raised very high interest but it has fallen behind its expectations. Not that trendy anymore.

I was surprised to see how janky the gallery demo app is on mobile, especially considering Dart is AOT compiled. Apparently Flutter is single threaded too and has a feature called "Isolates" but I'm not sure if they can be used to paint animations off the main thread

Have you tried it recently?

When I tried it a couple of weeks ago on an old Android device (Pixel 3A) there was a little jank. Then I tried a couple apps bundled with Android and was surprised to find a comparable amount of jank.

I've heard it's worse on iOS though.

Re: All you should know about Flutter development

#13
Some opinions about good choices here, over a year of app development:

* Don't get confused by the myriads of state management solutions. Just use GetX, it's a sane solution that works as advertised.

* There were a couple of storage plugins like hive that claimed to be better because they be native to the platform and not SQL. As with all platforms, that's bull. SQLite is available, so use that.

* The routers are a clusterfuck, the recent addition of declarative routing by the flutter team was a step in the wrong direction. However, the go_router (in the list) that's based on that looks actually nice.

* Evade everything with code generation, it hinders a good development workflow and the related plugins for that regularly break. For JSON-serialization that's hard though, I make an exception here, since there are many DTOs to manage.

* Flutter theming is a mess. An example that says it all: If you set a colorScheme with a primaryColor, Theme.of(context).primaryColor is not automatically that color. The results of the new ColorScheme.fromSeed() were awful in my test. flex_color_scheme solves that. Be prepared for significant changes here when Material 3 gets fully introduced to Flutter (the recent release 2.10 started with that).

Some things to keep in mind despite plugins: Flutter is not ready for the web (and the sites it would produce are JS abominations, so it will never be suited for the web if the approach does not change) and while the framework seems more stable than native app development, there are still breaking changes, both in the core and even more so in the plugin ecosystem. Selecting plugins based on a good stability is hard (as it's not obvious), but worthwhile.

Despite its shortcomings and Google connection Flutter is really nice to build iOS and Android apps with one code base, and I'd prefer it even for just an Android app by now.

Re: All you should know about Flutter development

#14
Loving Flutter to bits. It's been such a tremendous help publishing a fast, reliable and good looking app cross platform. It can't really be compared to anything else. The regular updates are awesome as well. There is always performance improvements and other things to look forward to.

Keep going!

Re: All you should know about Flutter development

#15
post #13

Some opinions about good choices here, over a year of app development: * Don't get confused by the myriads of state management solutions. Just use GetX, it's a sane solution that works as advertised. * There were a couple of storage plugins like hive that claimed to be better because they be native to the platform and not SQL. As with all platforms, that's bull. SQLite is available, so use that. * The routers are a c…

> Don't get confused by the myriads of state management solutions. Just use GetX, it's a sane solution that works as advertised.

Saying this doesn't help anyone. There are many alternatives and as you say, they compete fiercely for Github stars. GetX is popular package, but it has it's drawbacks: maintainer and bloat.

- Maintainer: he's been known to make wild claims about his package, and target other alternatives with strong unbacked opinions.

- Bloat: it tries to do a lot of things. Integration with other packages, concepts and tools don't work well - certainly doesn't integrate easily.

Re: All you should know about Flutter development

#16
post #13

Some opinions about good choices here, over a year of app development: * Don't get confused by the myriads of state management solutions. Just use GetX, it's a sane solution that works as advertised. * There were a couple of storage plugins like hive that claimed to be better because they be native to the platform and not SQL. As with all platforms, that's bull. SQLite is available, so use that. * The routers are a c…

> Don't get confused by the myriads of state management solutions. Just use GetX, it's a sane solution that works as advertised. Saying this doesn't help anyone. There are many alternatives and as you say, they compete fiercely for Github stars. GetX is popular package, but it has it's drawbacks: maintainer and bloat. - Maintainer: he's been known to make wild claims about his package, and target other alternatives w…

That's exactly what I mean - none of this matters. The maintainer does his job well and GetX does solve the problems it claims to solve nicely. Use Obx with a GetX controller and you are done. The other parts of the project, like the routing, are an option if it fits to your app.

And sorry, I really think this stated clearly is helpful. It's not worth your time to even look at alternatives. Sure, that could change in the future if the plugin gets abandoned, but it has seen good maintenance so far and zero breakage. Everything else to my eyes is FUD.

Re: All you should know about Flutter development

#18
post #13

Some opinions about good choices here, over a year of app development: * Don't get confused by the myriads of state management solutions. Just use GetX, it's a sane solution that works as advertised. * There were a couple of storage plugins like hive that claimed to be better because they be native to the platform and not SQL. As with all platforms, that's bull. SQLite is available, so use that. * The routers are a c…

GetX is a very high-level API for Flutter, it works for simple things, but as you go on you will realize how restricting it is. It abstracts away details not meant to be abstracted away. It's just bad design, and it's anti-patterns will bite you.

Just learn how to do things the proper way, because it's not that hard, and much more expressive and clean.

If you go for Flutter job it's best to not mention GetX either.

Re: All you should know about Flutter development

#19
post #13

Some opinions about good choices here, over a year of app development: * Don't get confused by the myriads of state management solutions. Just use GetX, it's a sane solution that works as advertised. * There were a couple of storage plugins like hive that claimed to be better because they be native to the platform and not SQL. As with all platforms, that's bull. SQLite is available, so use that. * The routers are a c…

> Don't get confused by the myriads of state management solutions... > Evade everything with code generation...

It is funny to see this theme getting repeated in various domains: at the same time, you will get users who complain that there are not enough choices for them in domain X, while others complain that there are too many choices in the same domain X. And usually there is no single best solution to rule them all.

E.g. in these specific items, I've found bloc + freezed-based code generation to do state works much better for me than any alternatives. ymmv.

Re: All you should know about Flutter development

#20

I think developers often want to find a “one true cross platform toolkit for all cases” and I don’t believe that will ever exist. It depends so much on both your app/market but also the skills and experience within your team. No 1 priority is move quickly. Flutter is brilliant, and probably the way to go, for some apps. A great example of a successful Flutter app is the Sonos app, relatively simple and responsive ui…

I've been wondering why webviews with native page transitions aren't a more commonly used thing. It improves the UX a lot by dealing with the abrupt navigation changes of regular web apps. There was a plugin for Cordova that did this (https://github.com/Telerik-Verified-Plugins/NativePageTransi...) but it's abandoned.
Post reply on HN