by phil294 on 5/5/23, 12:57 PM with 76 comments
by nathaniel_green on 5/5/23, 2:31 PM
At the company I work at we currently target 5 platforms across our internal and user-facing apps, (Android, iOS, Linux, Windows, Web), and Web is the one that consistently seems to cause the most issues. Performance is a big one of them, I've done about 8 years of webdev now and there is a noticable performance difference between using a canvas-drawn UI in Flutter and the usual React-based equivalent.
We've mostly stuck to using it for internal applications, as well as for a small portion of our user-base that prefer to access our user-facing mobile app via a desktop. It also serves as a decent backup deployment target if you need to push a hotfix for some users and can't wait for the App Store review to go through.
It doesn't seem like the Semantic HTML issue will ever be solved too, the Flutter team did mention in the latest conference that they're aiming it more to be used for web apps than websites.
For the other platforms however it works great, and I'd definitely recommend it for anyone looking to make a cross-platform app that doesn't need to rely heavily on working on web.
by abraxas on 5/5/23, 2:15 PM
by hexer303 on 5/5/23, 2:35 PM
The author completely missed the point of Flutter. It is a mobile-first platform positioned as an alternative to ReactNative. Its main goal was to provide a way to build cross-platform iOS/Android mobile apps with a minimal performance trade-off. For example, its code is compiled into native machine code for iOS, Android, and desktop. Its apps tend to be more lightweight and feel snappier. Unlike ReactNative they do their own rendering so that you can have pixel-perfect consistency across platforms.
Flutter's web and desktop support is more of an experiment and a convenience for those who want to port their existing mobile apps to web and desktop.
ReactNative was targeted for web developers who want to port their existing apps to mobile, Flutter's web support is the reverse of that.
by phil294 on 5/5/23, 12:59 PM
Unfortunately, the malicious state of Flutter web has not changed.
by preommr on 5/5/23, 2:26 PM
by pritambarhate on 5/5/23, 2:11 PM
Though at our company we have adopted Flutter for mobile in a big way, I am still waiting it out for at least 2 years to see where Flutter web goes.
by Ocha on 5/5/23, 2:13 PM
by eimrine on 5/5/23, 2:20 PM
by mkl95 on 5/5/23, 2:18 PM
by SilasX on 5/5/23, 2:43 PM
>Most importantly, semantic HTML is key for accessibility and other tools that let a user experience the web as they wish.
This! So much this! Web UIs like Flutter increasingly break the ability of extensions to make sites more usable.
But I read later and find the author is having a seemingly less degraded experience than I am with our favorite tool for browsing the web, Vimium:
>I use the browser extension Vimium to navigate the web, it’s an amazingly powerful tool that relies on, you guessed it, semantic HTML. Does it work on pages built with Flutter Web? Fuck no. It doesn’t work because it tries to find things that are semantically clickable, like button or a elements, of which, as we have established, Flutter Web generates none. Vimium works on almost all websites I use because most developers, thankfully, don’t just stick onClick handlers on divs.
I've found that many elements on the web don't get picked up by Vimium, even well outside the Flutter ecosystem. Heck, even HN search (via Algolia[1]), despite the minimalism, doesn't let Vimium detect the option dropdowns as clickable. (The Stories/Popular/All Time UIs.)
by barankilic on 5/5/23, 3:18 PM
I think Flutter is a good idea with bad execution. Maybe due to the lack of resources or effort put into it or maybe due to the management, I don't know.
The only thing that is cross-platform right now is the web and it is based on graphics engines (Skia in the case of Chrome). My idea of Flutter is that it is being web (i.e. cross-platform) without being a browser (i.e. overhead of being browser). However, in practice, I couldn't observe a good performance from Flutter when I tried it.
Right now, a lot of apps are developed using Electron (aka Chrome). Flutter is the equivalent of Electron for mobile without the extra layer of having a browser. With the advent of frameworks using WebView (WebGPU is also becoming popular) such as Tauri, we may need less Electron and Flutter.
> Flutter Web in particular is fundamentally flawed and needs to be rebuilt from the ground up if it has any hopes of being viable tech that generates semantic, accessible, and modern web experiences.
I don't know the exact technology of Flutter Web, but I think Flutter Web doesn't makes sense because it is running a renderer (Flutter) inside a renderer (browser).
by creichenbach on 5/5/23, 2:45 PM
The problem with cross-platform frameworks is that they either focus on a good mobile experience, and web becomes an afterthought, or vice versa, meaning mobile basically embeds a browser. Flutter is one of former; back then the web variant was in alpha and basically just a canvas that couldn't even adjust aspect ratio. Since web had priority for our project (accessability, reactive scaling, etc.), this was a no-go.
We ended up going with Ionic (which is basically Cordova with some components on top). The web experience is tweakable to a low level, and the mobile experience is acceptably good, even if not perfect. And we get to cover 3 platforms with the effort of building for ~1.2 apps (there is some platform-specific work involved still).
I'm not even sure if cross-platform is at all solvable in a perfect way, since the UI patterns between mobile and web are just too different.
by RcouF1uZ4gsC on 5/5/23, 2:17 PM
The goal of Flutter Web is to make an app that runs in a web browser instead of on a phone or on the desktop. It is not trying to be an html document. iOS and Android and Windows and Mac apps don't have "semantic controls".
by account-5 on 5/5/23, 2:46 PM
I do get the accessibility issue with it but to me it seems that's been sacrificed for ease of development. A trade-off. Genuine question, is there a way to make canvas accessible or is it designed inaccessible? Or is flutter using it in an unintended way?
I'm certainly a happy user of dart/flutter. I'm not targeting the web. I would never use it for a real website but I definitely would for an app though if I was moving anything into the web.
by GlacierFox on 5/5/23, 2:49 PM
>>> What scenarios are ideal for Flutter on the web? Not every web page makes sense in Flutter, but we think Flutter is particularly suited for app-centric experiences:
Progressive Web Apps Single Page Apps Existing Flutter mobile apps At this time, Flutter is not suitable for static websites with text-rich flow-based content. For example, blog articles benefit from the document-centric model that the web is built around, rather than the app-centric services that a UI framework like Flutter can deliver. However, you can use Flutter to embed interactive experiences into these websites.
by spankalee on 5/5/23, 2:40 PM
Flutter was a much better idea when the project was named Razer and its goal was to create a fast subset of the web that could run in the Razer runtime or on the standard web. Once they ditched documents, JS, and chose graphics primitives that the web couldn't support, the project really painted itself into a corner wrt the web.
I think this would be an awesome goal for Servo these days.
by foul on 5/5/23, 3:00 PM
Flutter leverages GTK3 heavily on Linux. Isn't that the case for other desktop OSes, like, it calls OpenGL/metal or something on Win and Mac? It seems to me that this statement is true only for web and mobile targets, maybe not even there though.
by taeric on 5/5/23, 2:50 PM
by nfriedly on 5/5/23, 3:05 PM
by mike_hearn on 5/5/23, 3:01 PM
There are a few ways to tackle this:
1. Try to improve Flutter Web.
2. Try to improve browsers, so people can use non-HTML frameworks without compromise.
3. Escape the browser.
It doesn't seem likely that (1) or (2) are going to yield much fruit. Flutter already works well on mobile and has picked up a surprisingly large proportion of mobile apps in the app stores. The obvious path is therefore to do the same on the big screen and distribute as desktop apps. The UX can be better than you'd think, especially as internet connections get faster.
This approach solves a lot of the problems the article complains about. Desktop apps can export proper accessibility trees, do keyboard focus properly, they can start really fast and so on (and flutter apps do start fast).
I talked about this path and why it's getting easier on the It's All Widgets podcast [1]. We've added support for Flutter apps to Conveyor [2] so the packaging and deployment aspect is now much better for people who choose to use it. But there's still work to do, to make all that work really well:
• Flutter Desktop has some native code to start and load the VM, which you're expected to customize and compile. That's a pity because the actual code is all Dart bytecode, so this complicates compilation without much justification. It could be made to work the same way as Electron or the JVM where you have pre-made binaries.
• Signing. Conveyor can sign for any OS from any OS so the technical pain goes away, and you can also do self-signing. But "proper" signing is not ideal.
• Sandboxing.
You could have a browser-like thing that provides sandboxing, caching and so on whilst exposing low level APIs, whilst doing a much better job of being 'semantic' than the web ever did. Actually I wrote up a proposal for such a system [3] and sent it to Ian Hickson who runs Flutter, but as he observed, the problem is incentives. Developers generally don't pay for platforms outside of cloud services and game engines, so, nobody is incentivized to build out the infrastructure to solve those problems. For as long as that's the case, people will try to hack the browser into submission.
[1] https://itsallwidgets.com/podcast/episodes/46/mike-hearn
[2] https://hydraulic.software/blog/10-flutter.html
[3] https://docs.google.com/document/d/1oDBw4fWyRNug3_f5mXWdlgDI...