I have turned pessimistic on Flutter after they failed to fix this catastrophic issue for years, and I'm not someone who is ideologically opposed to cross-platform UI technologies in general.
Imitating native user interfaces takes a huge and continued effort. It's always a step behind and in danger of falling further behind. How long until it gets defunded?
Not if the topic is choosing a technology stack for mobile development. Battery usage is an absolutely key consideration. It's the one thing that many users will notice even if they don't care about tiny UI differences.
My statement wasn’t merely about UI. It’s about a lack of respect for conventions. It’s about many things that are inherently wrong with Flutter’s pretend-to-be-native approach, which happens to include UI boondoggles.
Flutter would have been better off with an entirely separate UI convention and stop trying to pretend to be like native apps. I’d still hate it because it really adds nothing to the story that wasn’t in Java+Swing two decades ago, but at least they could start paying attention to how poorly Flutter apps work in their intended contexts instead of trying to keep up with the Joneses.
The abysmal macOS System Settings, with how it cribs from iOS design language, seems to be doing what Flutter is accused of. Though perhaps that is less the fault of SwiftUI, and more of Catalyst.
>Except you were posting on a sub-thread discussing the importance of those “tiny UI differences”.
Not true. The sub thread was about whether or not users can tell the difference between native and cross platform apps, specifically Flutter, and whether they care.
satvikpendem wrote this:
"Good for you, but most people can't tell nor do they care, given that I've shipped Flutter apps across thousands of users, both consumer and enterprise, whom we collect feedback from. Not once did anyone complain about the app visuals or performance itself"
The context is everything and anything that users could notice and provide feedback on, not just visuals.
Also, I think you may have missed the link in my argument between battery usage and the attempt to imitate native visuals.
Sigh … It's 2023 and somehow some people still don't know how to use internet discussion boards… Come on, you've been lurking in there for the past 16 years!
The original messages in the sub-thread [1] and the message you were responding to[2] were about UI/UX. Had you responded to the even higher level comment you are referring to[3], then you'd have been on-topic…
The same way, if you started to criticize Crux (the topic of the OP) at this point of the thread, you message would be completely off-topic as well.
I do not accept that discussing battery usage in a debate about cross platform technologies is-off topic just because the direct parent comment didn't mention it.
The parent comment claimed that users don't notice the difference between native and cross-platform. I responded saying that even if they didn't notice the visual difference, they will surely notice the battery drain directly caused by the attempt to achieve accurate visual parity.
This is not off-topic by any reasonable standard. This is merely addressing a closely related and very relevant aspect of the same topic.
It does suck that Flutter doesn't have as much bandwidth for people working on it as I'd like, but I'm not sure there's much one can do short of directly contributing and sending PRs, which it seems the author of that issue has done for a temporary fix.
The "temporary" fix is to allow developers to disable the cursor animation, i.e deviate from the native look & feel.
After almost four years of saddling every Flutter app that uses text input with anywhere between 5% and 20% CPU usage, this is what they have come up with.
What this tells me is that it is neither possible nor beneficial to imitate native UI toolkits using a completely different technology stack. It's simply the wrong architecture.
I disagree. Web technologies are highly optimised for what they do (i.e text field uses 0% of CPU), run compiled code on all platforms and don't waste resources on chasing this unachievable and pointless native fetish.
I don't understand your position. You're saying (correctly I think) that most users don't care about native. But then you turn around and choose an immature technology that spends a significant share of its budget on trying and failing to imitate native.
The bug I cited betrays the priorities of the project. They chose to prioritise chasing "native" over fixing a critical bug for many years.
Also, look at the large amount of investment going into web technologies - WebAssembly, WebGPU and many others. Even much criticised Apple is putting in a lot of work. I don't think the completely isolated Flutter/Dart team will ever be able to compete.
And how are those web technologies going for the bloat of Electron? There is no free lunch.
Flutter binaries and runtime are orders of magnitude smaller and faster than web technologies. True, they shouldn't be chasing native, but it's still better than what we have currently with trying to cover 6 OS with web technologies.
Not sure why you keep harping on Electron. It's not even available on mobile and choosing to distribute an entire browser engine with every single app is not the same thing as choosing web technologies in general. The Dart runtime isn't any faster than V8 either.
My point is that web technologies are quite poor for building multi-platform apps, something which Flutter excels at, even as it has its own issues. I consider those a worthwhile trade-off. I don't understand the points you're making, first you talk about battery drain, fair, then you talk about native, but it seems like you're missing the fundamental benefit of why some devs choose Flutter, which is that it works everywhere you need it to, and fairly fast, too. People use Electron for this generally, so that is why I brought it up, and I am saying that Flutter is a better alternative to Electron and other web technologies, and I am not sure exactly what you mean by web technologies, but I colloquially understand that to mean HTML, CSS, and Javascript. They are good at things like text rendering at 0% CPU precisely because they've been honed over decades, something which Flutter has not yet been able to.
The compiled code from Dart is faster than V8, even simply by virtue of being AOT compiled instead of JITed, not sure where you saw that it wasn't any faster. Also, web technologies do not run compiled code on every platform, they don't run compiled code on any platform, I'm also unsure of where you're making that claim from, unless you're talking about WASM which is still a ways away, and something that Flutter leverages too already (see their work on pushing WASM GC as well as their experimental build of Flutter Web with WASM GC), so it's not unique to web technologies like HTML, CSS, and Javascript.
I've had a decent experience building a webapp that can be used on the browser, and with some light packaging on the desktop and on mobile without being a full on electron app (webview instead).
At the moment it's a different tech stack for packaging mobile vs desktop app, but I'm waiting for Tauri to implement support for mobile to migrate everything to Tauri (I'm using a go webview library for desktop and capacitor for mobile).
Note: I know devs are usually allergic to multiple techs far various targets, but it was pretty much a one-off time cost, 99% of the dev time is spent working on the webapp itself.
>My point is that web technologies are quite poor for building multi-platform apps, something which Flutter excels at, even as it has its own issues. I consider those a worthwhile trade-off.
I have come to the exact opposite conclusion starting out with an open mind just like you. Flutter seems like a quixotic effort to me. Bugs like the one I linked to are a confirmation of that.
>Also, web technologies do not run compiled code on every platform, they don't run compiled code on any platform, I'm also unsure of where you're making that claim from.
JIT compiles to native code. WebAssembly is another option.
How would you make cross platform apps using web technologies, including mobile, desktop and of course web? I've tried a lot of web-based frameworks like Capacitor, Ionic, Cordova and even React Native (which isn't necessarily web tech as it's just a DSL to call out to native components), and I haven't really been impressed with either the performance or UX of any of them. They all feel (except RN) like you're using a website, not a native app, which is because that's basically what you're doing.
Thanks for the benchmarks, seems they're about even.
>They all feel (except RN) like you're using a website, not a native app, which is because that's basically what you're doing.
I mean, it really depends on the specifics of your app. For most apps it wouldn't hurt one bit if they were just good mobile websites or PWAs (possibly packaged for app store distribution).
For computation heavy code WASM is becoming a viable complement to JavaScript. WebGPU is on the way. And Figma has just sold iself to Adobe for $20bn after annihilating native competitors (I realise I'm painting in very broad strokes here).
I think there is a niche for mostly client side, offline-first apps that still have no need for deep integration with the native platform and are not games. But it's a small niche getting smaller.
The technogies living in this space will forever be changing, falling out of favour only to be replaced by the next attempt. It's been going on like this forever (Java Applets, Swing, Flash, Xamarin, ReactNative, Flutter...) It's not something I want to build a business or a career on.
But I guess if Flutter works for you and your users right now then why not.
Technologies like Flutter, Blazor, Rust GUIs that similarly draw to the canvas etc also are all leveraging WASM and WebGPU too though, so I'm not sure how much benefit there is on using the pure web for stuff like this. Even Figma's main canvas editor is written in C++ and some Rust, it's not using Javascript. I expect that if WASM and WebGPU become mainstream, people will simply use their programming language of choice and render to a canvas via WASM, and be able to port that to mobile and desktop. This is basically what Flutter does anyway so it's ahead of the curve of what you're predicting.
True, some apps could be packaged websites, but you will always be able to tell. The Twitter app is one example, and it's definitely not as smooth as 3rd party native apps, or even those made by React Native or Flutter. I simply consider PWAs a bad user experience based on the many I've tried.
It's incorrect to say AOT is always faster than JIT (without profile guided optimization). And it's reasonable to call jit-eligible code sometimes compiled.
Client apps are most of the time not long running processes where JIT could reach steady state performance and startup time is important. So in practical terms, AOT is faster than JIT majority of time in this use case.
> What this tells me is that it is neither possible nor beneficial to imitate native UI toolkits using a completely different technology stack. It's simply the wrong architecture.
IMHO, UI toolkits based on low level technology stack are the future. It just that they are massive undertaking. It's not impossible to implement cursor animation with low CPU usage.
I have turned pessimistic on Flutter after they failed to fix this catastrophic issue for years, and I'm not someone who is ideologically opposed to cross-platform UI technologies in general.
Imitating native user interfaces takes a huge and continued effort. It's always a step behind and in danger of falling further behind. How long until it gets defunded?