r/FlutterDev • • May 17 '21

Discussion Flutter Web - feels too artificial

I've been trying to make a small web app off the back of Flutter Web since its stable release... and I love the fact I don't need to write HTML/CSS/JS for everything... But, the scrolling still feels a little off, even if it's close to the real deal. The navigation 2.0 is way too complex and not developer friendly, and these are just the tip of the iceberg for me. Significant features that are so often overlooked, such as right clicks to open in a new tab/window/incognito window, don't appear. The community is so small it's hard to talk through problems that arise. Don't get me wrong, I think it's really amazing what Flutter have achieved so far in the web space, but everyone knows how the web is supposed to feel, we're all so used to HTML that anything which attempts to resemble it feels wrong and too artificial. Does anyone out there think there's any hope for Flutter Web, or is it just another Flash waiting to be abandoned?

93 Upvotes

63 comments sorted by

31

u/sabaybayin May 17 '21

I think it's still experimental and not really "stable" in the sense of performance. Try to consider it as a fun little experiment for now and something that hopefully will improve over time.

54

u/[deleted] May 17 '21

Hot take: Then it shouldn't be in the stable release of flutter.

Promoting web from beta to stable gave people a false sense of it being ready now, when in actuality they meant it 'works' now. I've already had to go in and hack at the web files to switch the app over into HTML rendering mode because the canvas renderer breaks/lags if you have too many images in your view, so if you've got a grid or list of cards with images, you're going to have perf problems. And that's the feeling I get from flutter web in general right now, it's still an experiment / beta feature that some PO said "We need to ship this now" instead of a fully done platform the same way Android and iOS are.

17

u/Baul May 17 '21

I mean, they moved desktop support into stable, but were very clear that it's not "stable," rather that it's super handy to be able to hack on Flutter stuff on your desktop without switching channels. They were super clear about that.

If web doesn't meet your standards, don't ship on web. It'd be crazy to just say "well Google says its stable, let's ship it!"

4

u/[deleted] May 18 '21

Then it should still be behind a feature flag like Desktop support is. It's really google just jumping the gun to release a tool before it's ready so they can say it supports web when what they actually mean is if you have a very simple fully flutter use case, it works pretty well, but even something as simple as a grid of images causes flutter web to stutter and jerk because the canvas renderer can't keep up because of javascript limitations.

I feel like you think I'm unhappy with flutter, but I'm not. I just have valid criticisms against calling something stable that's definitely still beta. What I am unhappy with is this potentially being the announcement that got some holdouts to look at flutter and then they run into all these issues and decide to abandon it. I don't want the image of flutter to be hurt because I really want it to improve, but if 'flutter has janky scrolling' becomes a meme, it can cause lasting damage to the platform, even if the issue is fixed later.

5

u/darkmoody May 18 '21

All companies push unstable features like this into "stable". Look at Apple with SwiftUI for example. They need as much early adoption as possible in order to receive feedback quickly and iterate. It does come at a cost for developers, but it helps the companies tremendously, so of course, they're selfish in this regard.

6

u/[deleted] May 17 '21

100000% agree.

5

u/robschmidt87 May 18 '21

It seems you mixin up sw-dev terms "stable" with "robust" and "performant". Stable just means that the APIs are final.

If you can remember webdev before Google Chrome. Everything in JS was stable (no breaking api changes) but it was sloooooow.

2

u/[deleted] May 18 '21

Generally I agree with you, but flutter markets itself on being able to build a performant and robust UI, that’s my gripe.

2

u/sabaybayin May 18 '21

I agree the Flutter team is a little too liberal in applying "stable" and I disagree with the way they are shipping features with the "Oh we'll just fix it while it's out there" since our projects and livelihoods rely on this stable platform.

24

u/eibaan May 17 '21 edited May 17 '21

My company decided in 2018 to use Flutter for creating mobile native cross platform apps and we don't regret this decision. Whether Flutter also works for web application or not doesn't matter much in this regard. Flutter is still great. We can deploy apps for the browser and that's useful to provide access to apps without the hassle of Testflight or the play store. That's a nice bonus.

We even deployed a couple of Flutter web apps for customers but at that time, web support was pre-alpha and it wasn't a great experience. Because not that much has changed in the last 18 months or so, I've decided that we will not use Flutter for web sites or web apps for a foreseeable future. Maybe I'm too impatient, but I'm not going to wait to see if Flutter web becomes a convenient solution, I'm going to use a different technology.

I also experiment with Flutter desktop, which at the moment is even more inconvenient because you have to create a lot of native glue code to make it look and behave at least a little bit like an ordinary macOS app – in my case. Again, macOS support is a nice bonus for quickly testing mobile apps without a simulator but for out-of-the-box desktop support I at least expect a decent macOS and windows look, multiple window support, real context and pull down menus, modal dialogs (i.e. file chooser), drag and drop support, etc.

However, playing around with desktop UI pattern, I noticed that I don't need a navigator supporting the drill-down navigation we all know and love from mobile apps. Instead, I need documents that most often have some "modified" state. Because I understand Flutter web as a browser runtime instead of an alternative way to create web sites, I'd probably use these desktop patterns also for desktop web browsers.

BTW, hopefully, once the Web assembly standard has an official GC extension, Dart can be compiled into WASM instead of JavaScript and there will be even less "web technology" in Flutter apps and the transformation of the browser into some kind of operation system that runs WASM binaries will help to create the next generation of "web apps" in Flutter.

But in the meantime, I'll check out Svelte :)

5

u/aelixira May 18 '21

But in the meantime, I'll check out Svelte :)

You'll not be disappointed. Svelte is just great. Lightweight and fun.

3

u/eibaan May 18 '21

"Lightweight and fun" is exactly what I'm looking for :-) I really dislike if I have to download "half of the internet" into my node_modules folder, just to build an HTML page.

1

u/[deleted] May 18 '21

It will be a while before wasm is faster than JavaScript in a UI context. Wasm is great for intensive backend features, but there is a delay while resources are loaded making smaller tasks faster in JavaScript.

An intensive game or data processing app would benefit from wasm, but probably not most UI oriented apps.

2

u/eibaan May 18 '21

Flutter currently uses WebGL via Skia which is compiled down to WASM and because Flutter is currently compiled to JavaScript, this requires a JS->WASM bridge for each and every function call. My assumption is that if Flutter itself would also be WASM, this bridging could be omitted and the engine would be faster. Note that I'm assuming that like with other game engines no attempt is made to use HTML for displaying the UI.

Since 2018 there's some ongoing talk about the feasibility of a WASM backend but I got the impression that Google isn't really interested. They once had an intern work on a proof of concept but that intern left. It would be funny if it wouldn't be sad…

1

u/[deleted] May 19 '21

I'm not sure about any of the JS and WASM stuff, but I can tell you that flutter does have a rendering mode that uses HTML elements instead of the Skia Canvas. The default behavior for flutter web is to use the canvas renderer on desktop web and the html renderer on mobile, but there are valid reasons to force a different renderer than the default on both platforms.

2

u/eibaan May 19 '21

The HTML mode is used on less-powerful mobile browsers. On desktop browsers, CanvasKit is used. You can overwrite this choice. But I'd assume that wasm + webgl will eventually "win".

1

u/[deleted] May 19 '21

Yeah, I'm intimately familiar with the matter. Canvaskit wasn't the correct choice for our app and actually performs much worse than the HTML renderer. I do hope it will win out eventually, because the issues I was hitting seemed like they'd be solvable, just weren't considered yet. And sometimes the html renderer does 'interesting' things to text.

36

u/[deleted] May 17 '21

Flutter web is for making a pixel-perfect version of your mobile app work on the web. It's not for building websites. It's not for "web first" projects. It's not for situations where your web interface should function significantly differently from your native versions.

IDK why people seem to have issues with scrolling, I think it's potentially from using the wrong widgets / incorrectly using widgets and layouts. My flutter web apps feel very natural. But I spend several months taking tutorials and learning all the widgets before building.

8

u/Nauzet May 17 '21

can you give some tips? I'm not being sarcastic.

3

u/Extension-Content May 17 '21

Exactly. When we are starting development in Flutter, we create a trash code and performance is ok but we tought "It's excelent" but in reality has a bad performance. While few months after, you improve and you know the widgets in details, you can create apps with high performance and the Flutter web's artifical feel disappears

4

u/Sheeple9001 May 18 '21

My flutter web apps feel very natural

Do provide a link and I'll tear it apart in Firefox and WCAG checkers.

11

u/Cymarxcr May 17 '21

I feel like I read this exact same post every single day on this subreddit. People complaining about web.

6

u/Ultra1101 May 17 '21

I think people don't understand that Flutter Web is not a JS replacement. It's an easy way to migrate a flutter mobile/desktop application to the web while maintaining a similar feel and cutting dev time significantly. It's not designed to provide rich scrolling experiences, SEO, or standard web interfaces. It's designed to build web apps and nothing more.

5

u/[deleted] May 17 '21

[Flutter web is] not designed to provide rich scrolling experience

......

3

u/Ultra1101 May 17 '21

Flutter Web from it's inception has been a port of Flutter Mobile, so I don't understand why you're still confused. Just because the web platform has tradionally had a rich scrolling experience doesn't mean Flutter Web is capable of such a thing. Google clearly has designed Flutter Web with a specific use case in mind. This is why you should not view Flutter as a replacement for JS but as an easy way to port over your other applications. Flutter Web as of now is not the framework to use if you need rich scrolling experiences.

1

u/[deleted] May 19 '21

I'm going to need you to define what constitutes a rich scrolling experience, because I've seen examples on the scrolling perf tickets that are list views with a leading image... that doesn't seem very 'rich' to me.

0

u/Ultra1101 May 19 '21

Constant 60 fps scrolling. No jank. No slowdown.

2

u/robschmidt87 May 18 '21

Nearly every part of your write up has factual errors:

- "not a JS replacement" you actually referring to HTML, cause that's what rendered and is the base of the scene graph

- "not designed to provide rich scrolling experience", definitely wrong. More the opposite. It introduces concepts for culling techniques for scrolling and allows even smooth endless scrolling.

- "designed to provide SEO", Flutter has semantic tree and provides accessibility. It's definitely designed for that. It's just not implemented.

- "...standard web interface". Hell, Flutter uses WASM, HTMLCanvasElement and JS-interop. Those ARE standardized web interfaces.

2

u/Ultra1101 May 18 '21

1). Please give me a HTML only framework that produces web apps. Furthermore, you still need to write html using flutter web.

2). If you seriously think that scrolling was the priority when Flutter Web was moved to stable, you need to compare the scrolling performance of flutter web to a normal React website.

3). Usually, if a product is designed to do something, like my phone is designed to call, the feature should be implemented.

4). Standard web interface to the user. There is no inspect element, rich text measurement, or SEO. These are ways in which a user can interact with your website, hence an interface. These are things that all of us have grown accustomed to. Not having these is not a feature.

1

u/robschmidt87 May 18 '21

Any server side generated web-framework will heavily rely on HTML. If you compare Flutter to traditional web, you need to focus on HTML and CSS. Because those two parts are responsible for the graphical output.

I don't think scrolling on Flutter is final or perfect. You wrote 'designed to' that refers the critical flaws in fundamental software architecture. A good design and be implemented badly. You need to distinguish these.

Modern software development in complex scenarios (like Flutter) usually tend to be implemented agile. You do a design that can theoretically achieve something but implement a minimum value. If it's a bottleneck you can focus later on improving. Now we have such situation with scrolling, so the Flutter team focuses on improving on that. But the concept of how scrolling is realized, is not bad by design.

Inspect element is not a user facing interface. It a developer tool. If you want to inspect your Flutter app, there is a tool for that. I understand that you existing toolchain won't work on Flutter apps, because it's using Canvas instead of DOM api. But everything user facing is based on web standards. I can also write a JavaScript application with WebGL and you can not inspect everything.

In tech talks the Flutter team explained that Flutter internally tracks semantics and is able to provide SEO information soon.

I recommend you to be more clean on computer science terminology. Keep in mind that design is not implementation, and lower your expectionation. It's Google but they are only developers trying its best. It's very hard to achieve such a huge project.

1

u/Ultra1101 May 18 '21

Again, we are not comparing Flutter to traditional web as you keep repeating. We are comparing it to JS frameworks such as React, Vue, Angular, etc. There is no world in which a Flutter Web website is worth using over a static HTML and CSS website. Flutter Web is specifically for writing web apps/PWAS.

Flutter Web is on stable channel. I agree that there are still improvements to be made, but the fact that Google has this on stable means that scrolling is "good enough" for them. In a year or two, scrolling might be in a better place, but we are not talking about Flutter Web then. We are talking about it now.

I don't know how pointing out the obvious refutes my point about scrolling in any way. If a rich scrolling experience is not part of the MVP in Flutter's design, then Flutter is not designed specifically to provide a rich scrolling experience. I would view it not as a bottleneck but rather as low priority. The Flutter Team is focusing on other aspects of the web experience and that is okay. Speculating about when and if the Flutter team is going to get out a feature is a waste of time. For businesses, the framework needs to provide right now. If a rich scrolling experience is what you need for your product, then Flutter web is not your choice.

Inspect element is a developer tool, yes, but it is very useful to the user as well. Being able to see how a website works and what it is serving (very useful, especially in the case of ads) is important.

Again, SEO is not in stable right now, so the evaluation on the drawbacks of the framework concerns what is avaiable right now.

My computer science terminology might not be cleanest, but it should not stop you from understanding my argument. You should look at this objectively, and not emotionally. Just because Google is trying something big and revolutionary does not excuse them from criticism. All of the the drawbacks I mentioned are fair criticisms of their framework.

My expectations are in line with what I feel that I need for Flutter Web to replace other frameworks. I praise Flutter for what it does well and point out what it fails to do. This is my opinion, after all, and that is what I came here to express on Reddit. I am entitled to it in the same way that you are to yours.

3

u/Azarro May 18 '21

Do not use Flutter if you're looking to build serious websites, web products, web apps that need SEO, or really, again, any kind of serious website.

It is in the stable channel only because what Flutter defines as Flutter Web is no longer in an experimental state and it's workable now. But it's not exactly stable itself. I wish I could find the source but I'm pretty sure a Flutter dev has also said somewhere it's not meant for production-heavy sites but it's more for niche web apps.

If you're doing it for fun/learning that's defo cool but you will find, as you noted in your post, the "jankiness" that accompanies Flutter's web experience.

It tries to imitate the web because of how it's implemented but falls short and leads to the web's equivalent of the uncanny valley.

2

u/TonyBorchert100 May 17 '21

Kinda unrelated to this but wouldn’t it be a good idea to implement business logic in bloc, and then use the blocs to create a flutter app and a angular dart app? Never really heard anyone do this

2

u/[deleted] May 18 '21

Unfortunately: Google decided Angular Dart is an internal tool and now discourages people from using it to start new projects and recommends Flutter Web instead.

2

u/TonyBorchert100 May 18 '21

Thanks for insight

2

u/32zim32 May 18 '21

Right now we have interesting situation where if you develop with html, js, and use cordova or capacitor to move your codebase to mobile, you have native web experience and maybe not so fast (but actually no so slow) performance in mobile. But if you choose flutter, you have better mobile performance (but with tons of issues) and very poor web experience where even simple hoverable list feels laggy. So you choose...

1

u/[deleted] May 20 '21

Or React Native and React Native Web

2

u/Kevlar-700 May 18 '21 edited May 18 '21

vrouter solves all my issues with nav 2.0. The site is also written in flutter.

I have to say I am yet to see a rendering performance issue. Some quirks like pgdn keys not scrolling. Scrolling not continuing when you drag the cursor off page. That may be the browser though. What you get in return, is complete control. Not something I overly desire but good to know you can do anything you want, including plugging in graphical packages easily with high performance.

It's worth noting that js frameworks have quirks and performance issues compared to the native html experience too.

Flutter has the potential to be more performant at web than js scrolling tech with a fraction of the investment js has had, if it isn't already (not browser html in optimised c, though that still needs to be interpreted). I hope and expect Flutter to make it that far. IMO, the Js ecosystem and language sucks.

I have found that charts_flutter runs a lot faster as dart native on linux desktop for whatever reason (I'm assuming it is the chart building and not the json decoding taking a split second rather than several seconds).

1

u/Intelligent_Moose770 May 20 '21

In my phone. The scrolling is not smooth when navigating the link you posted. I have a Redmi note 9. It is very decent in term of computing power. There is a room for improvements in the area of scrolling

1

u/Kevlar-700 May 20 '21

Works fine in chrome on my budget nokia 6.1

1

u/Intelligent_Moose770 May 20 '21

Works better on chrome. I viewed it in the Reddit App maybe that's the reason.

1

u/Kevlar-700 May 20 '21 edited May 20 '21

The site is in the new default wasm mode which may work better on chrome. That should get resolved in time by other browsers and as wasm matures. Apple in particular are dropping the ball with wasm particularly as they require all browsers to use their engine that is behind in wasm support.

I expect this issue might not be present if the site was built in html mode (default before flutter 2)

I am surprised that system webview wasm support is not in sync with chrome though. Assuming reddit uses systemwebview.

1

u/Intelligent_Moose770 May 20 '21

Have you got any idea about how good flutter is compared to .Net Blazor ?

3

u/GundamLlama May 18 '21 edited Aug 19 '25

juggle dog reach swim light profit detail special chunky instinctive

This post was mass deleted and anonymized with Redact

1

u/anorak99 May 18 '21

Flutter Web is designed for making mobile-like web apps and dashboards. It starts to break apart when you start using it in a content heavy context.

1

u/jrheisler May 18 '21

If by off, you mean different, I agree! I guess you could use it to develop a website that looks like other websites. I chose it to extend a desktop app to the web. Desktop apps and Web sights are usually very different in feel. I've seen many desktop apps transition to the web, only to fail miserably. After a standard session, noticing a dozen open tabs, each one's data in heaven knows what state, or worse having to update the state in multiple place...
Apps don't work like websites, but with flutter, you can build a web app that feels like whatever kind of app you want it to, without the limit of what a website feels like.

0

u/bernaferrari May 17 '21

Yes, it is not better than HTML. But it is not trying to be. And will people feel any difference? No. Its target is at killing those monstrous angular web apps that are basically a few dashboards and many buttons. It is already succeding.

5

u/[deleted] May 17 '21

Why would you kill a monstrous angular application with flutter? Why wouldn't you kill a monstrous angular application with one of the other good frameworks that function way better on the web than Flutter? Maybe even just fix your angular web app? Migrating to flutter web because people screwed up the angular codebase seems to be like tremendously bad idea.

2

u/bernaferrari May 17 '21

Because nowadays many are migrating to apps and having a big desktop version of an app is better than having no web version at all.

-2

u/RyanTheLionHearMeRor May 18 '21

The same is true for Flutter mobile apps

Flutter just feels off

It's great developing in it, I'm highly productive. But after 2 years of building a giant app, I'm starting to regret my decision

1

u/mustafapc19 May 18 '21

What are the primary reasons where u felt using flutter was not the optimal solution?

Just incase this not an attack. Just curious.

0

u/RyanTheLionHearMeRor May 18 '21

It’s just that it feels off

Like OP said, everybody knows what the web and HTML should feel like

The same is true for iOS and Android apps. People expect them to perform and behave a certain way. And when they don’t, things feel off

1

u/bradofingo May 18 '21

Lol, you are probably using flutter made apps and you don’t even know. Take Nubank in Brazil. It is a digital bank and their app is built with flutter. It is incredibly smooth and nice to use.

-10

u/[deleted] May 17 '21

I agree but...

If your browser can't handle a Flutter web application, what make you think a 5 years old entry-level Android phone will handle the Flutter version of it?

Perhaps you are using (or thinking) Flutter Web as not the way it was meant to be...

9

u/mohelgamal May 17 '21

Flutter web isn’t straight dart and skia, it has to be partially compiled to JS, call browser APIs, wasm, etc , there is a big performance loss in that.

So a flutter app can work great and the same app won’t work as well in a browser.

0

u/[deleted] May 17 '21

[deleted]

2

u/[deleted] May 17 '21

That's not what I meant.

What I meant was: most apps are overcomplicated and full of useless features that makes it runs poorly on old devices. The same applies to web.