News for hackers. Stuff that matters.
Re:Flutter 2 by refulgentis on Wednesday March 03, 2021 @02:56PM (#26333540)
Things changed a lot, I observed the same symptoms as late as late 2020, I can't reproduce these issues now

In general Flutter for Web is _amazing_ if you want to deploy an app.

after seeing this thread, pretty clear to me its almost a perfect nerdsnipe - makes perfect sense if you're already building a Flutter codebase, sounds bonkers if you build web apps.

Re:Flutter 2 by dstaley on Wednesday March 03, 2021 @03:01PM (#26333605)
Check out Flutter Folio [1], built in partnership with Google. Right-click is actually disabled, so you can't even open the "Create account" link in a new tab, nor can I right click an input to autofill with my password manager. You can't inspect any image rendered to the canvas element. Furthermore, you also can't blur the form input (although that's probably application specific rather than Flutter's fault).

[1] https://www.flutterfolio.com/#/?

Re:Flutter 2 by yjbanov on Wednesday March 03, 2021 @03:20PM (#26333861)
(disclaimer: I work on the Flutter team)

The "Create account" link isn't popping up the right-click menu because it doesn't use the Link widget. You'd get the same thing in plain HTML if you used a <div> with a custom click event listener instead of <a>. It's a simple bug to fix; totally up to the app developer. I think issues like that will inevitably pop-up as we have developers coming to the web from other platforms, where "open in new tab" isn't part of the toolkit. Perhaps it's fixable via education and platform-specific guidelines.

We're aware of the input blur issue. I think the bug is in the TextEditable. You can write your own, of course, but since we offer it as part of the Flutter framework, it's on us to fix.

Re:Flutter 2 by capableweb on Wednesday March 03, 2021 @03:55PM (#26334378)
> You'd get the same thing in plain HTML if you used a <div> with a custom click event listener instead of <a>. It's a simple bug to fix; totally up to the app developer

This is the issue. Instead of having one codebase that works the same on all platforms (ios, android and web), you get (as a developer) the blame for not implementing things correctly across the different platforms.

Instead of a cross-platform development environment doing that for you.

Re:Flutter 2 by refulgentis on Wednesday March 03, 2021 @07:35PM (#26337028)
I have to be honest, not trolling at all, genuinely curious to me: I have the same opinion for the completely opposite reason! _without_ "Skia everywhere", Flutter for Web was annoying, because then there was this autogenerated CSS/JS and it might be _close_ to other Flutter platforms, but it often couldn't be 100% of what it was

I think its because we might be seeing it from two different points: i.e. you see Flutter Web using Skia is not consistent with _other websites and thus traditional webapps_, I see that Flutter Web using JS/HTML made it _not consistent with deployments of the same Flutter code to Android/iOS/Mac_

Definitely see that viewpoint and why it's problematic, would argue as an independent dev, would care much more about 100% self-consistency across my product line up for ease of support than whether people open the app in a web browser, you can right click on anything that looks like an image and download it.

Understand that viewpoint _also_ sounds like sacrilege, but as someone raised on iOS dev, reminds me of when Mac devs being upset over years as "iOS-isms" made their way to the desktop. I love that this approach is an example of solving hard problems over years, fixing a industry-wide yak shave that ended with you having 50 copies of chromium. solves the same problem Electron is solving with none of the downsides

Re:Flutter 2 by singhrac on Wednesday March 03, 2021 @03:46PM (#26334221)
> Perhaps it's fixable via education and platform-specific guidelines.

I think this is right, but I also think it should be clear to everyone (i.e. in the first tutorial) that not using a Link widget will make this work wrong for all sorts of accessibility and UX reasons. And the Link widget should work across platforms and implement the equivalent of page history correctly.

Maybe it's worth writing down somewhere what the equivalent of each tag from HTML is; what is the canonical way to create an h2, input, textarea, button, a, img, etc.

Re:Flutter 2 by capableweb on Wednesday March 03, 2021 @03:03PM (#26333631)
> I can't reproduce these issues now

dstaley just said that those issues happen now. " I just tried a few samples, and ..."

I just tried the demos over at https://flutter.github.io/samples/#?platform=web and I concur, Flutter is utterly horrible for everything the web stands for. So not amazing and seems to actively make everything worse.

Re:Flutter 2 by yjbanov on Wednesday March 03, 2021 @03:28PM (#26333953)
(disclaimer: I work on the Flutter team)

We certainly don't think Flutter should replace HTML or other frameworks. We hope Flutter will work well for many use-cases, but the web is huge. There's room for multiple approaches. If it's not working for your use-case it's totally fine with us if you use something else. We welcome constructive feedback on what's not working so we know where to focus our efforts.

Re:Flutter 2 by capableweb on Wednesday March 03, 2021 @03:53PM (#26334348)
Thanks! A great first step would be to have a "web-native" renderer for your web version. Meaning that it'll use DOM elements that the browser to handle the rendering of. Would fix many of the current issues with your implementation.
Re:Flutter 2 by realusername on Wednesday March 03, 2021 @03:11PM (#26333742)
I have a large Flutter codebase and flutter web is still alpha quality in my opinion, there's way too much jank to make it work properly on a web platform.
Re:Flutter 2 by yjbanov on Wednesday March 03, 2021 @03:21PM (#26333870)
Have you tried --web-renderer=auto?