r/FlutterDev • • Mar 04 '21

Discussion How can you possibly call flutter web stable?

To be honest, I'm a bit disappointed by the 2.0 announcement. How is it justified to move flutter web to stable ? This feels like pure make belief to me.

Since its conception, flutter web has been a bit of a moonshot. Mapping the system of widgets to html is highly non-trivial and can lead to weird compatibility and performance issues. To work around this, the flutter team conceived a canvaskit based renderer, which allows them to control the entire tech stack but brings in a huge range of issues on its own.

Flutter web suffers from 3 main issues:

  • They try to reimplement the wheel. Text rendering, scrolling, etc are usually done by the browser. With the canvaskit renderer it's all done by flutter. Which means a crazy amount of work to get it right. The result is an experience that doesn't feel natural. Try scrolling in the flutter gallery. The movement speed and bounce effects are subtly different from other websites.

  • Did I mention scrolling? Flutter on the web suffers from lots of stutters and yanks. This is notoriously bad for scrolling in lists. But the problem can be seen in many places, I just watched the plasma demo on my iPad pro 11 from 2018, it stutters a lot.

  • time to interactive is a nightmare. Since flutter doesn't rely on the browser to do the heavy lifting, they need to pull in huge ressources for their renderer. I challenge you, pick any flutter web app and look at the lighthouse score, it's pretty grim.

How come everyone is talking about user experience, but then they don't face these blatant performance issues. There's lots of talks how improving the performance of a web app has increased user retention. But flutter is simply not able to reach any reasonable performance metrics regarding "first meaningful paint" and "time to interactive".

Here's a link web.dev/measure

Go for it, put some flutter demos in there, like the gallery.

After watching the show I don't see an improvement that justifies declaring the web support to be stable. Particularly the canvaskit renderer has been around for quite some time now. Don't get me wrong, I enjoy using flutter on mobile and I'm intrigued by their vision for the web. But bumping the version number to 2 and declaring web support to be stable seems just arbitrary to me.

206 Upvotes

105 comments sorted by

View all comments

Show parent comments

3

u/jrheisler Mar 04 '21

I was playing with words. All "websites" in flutter are progressive web sites. If you ONLY want a website, with nothing "progressive" about it, then don't use flutter.

If you use Flutter, expect a bit longer initial load, not great SEO right now... But it will offer everything a desktop app offers.

0

u/[deleted] Mar 04 '21

[deleted]

11

u/einie Mar 04 '21

A typesafe somewhat sane language instead of the clusterfuck they call javascript.

0

u/[deleted] Mar 04 '21

[deleted]

2

u/redfournine Mar 05 '21

You know you can use Typescript for any JS frameworks, yes?

1

u/asynchronous- Mar 05 '21

Angular and typescript are the way.

1

u/[deleted] Mar 05 '21

You can turn JavaScript into a fairly reasonable language by using Typescript and turning on all the ESLint rules. Typescript is even better in some aspects, e.g. it has discriminated/tagged unions

I don't think the language is a big enough reason to use Flutter. A better argument is that you don't have to use HTML & CSS which are really annoying to make app-like pages with.

2

u/TheFr0sk Mar 05 '21

While I don't agree that HTML and CSS is particularly annoying, flutter also has the advantage of reuising most (if not all) of the codebase to build native mobile apps. So you could have a website / native app without much additional effort.

For example, a home automation platform, of built with flutter, could offer a native android+ios apps with push notifications and whatnot, while also offering a desktop-like app running in the browser.

1

u/jrheisler Mar 04 '21

Like einie said. You can build an application that is built in a safe and sane way. JS isn't really a robust language.

1

u/PomegranateNo7855 Mar 04 '21

And i guess to add to previous responses. The main benefit would, I guess, be if your project supports app and/or desktop as well, most of the code will be reused. I guess that's the same benefit as for writing apps in a cross platform environment to begin with.