Live data from Hacker News

Flutter 2

developers.googleblog.com

391–400 of 780 posts

Re: Flutter 2

#391

Earlier quoted context omitted.

Not who you asked (and I just now realized I'm replying to you twice regarding this OP, I solemnly swear it's not some crude attempt at stalking). But for me the main use for TS union types is to make discriminated unions, which is very useful wherever you have some form of a state-machine: type AppState = | { state: "loading", progress: number } | { state: "selecting_level", } | { state: "playing", level: Level } |…

Haha. That's alright. That looks super neat though, I must admit. The only equivalent that comes to mind would be using an abstract class. I still might fail to fully understand what that code example does, but, would this be somewhat similar? abstract class AppState {} class AppLoading extends AppState { final int progress; } class AppSelectingLevel extends AppState {} class AppPlaying extends AppState { final Level…

Indeed, that is basically what you get from unions, except the exhaustiveness check.

Unless I'm mistaken, if one were to later implement a new class that extends AppState, all existing code would compile, but possibly fail or misbehave at runtime, unless you meticulously checked every place that tries to determine something based on those derived types.

In TypeScript, adding a new case for an union and not handling it everywhere is a compilation error on every incomplete usage site.

For example, try deleting one of the arms of the switch in this playground: https://www.typescriptlang.org/play?ts=4.2.2#code/C4TwDgpgBA...

I have to say, the default diagnostic isn't brilliant, but some tooling will give a better error and actually point out the missing arms, instead of complaining about the return type.

Re: Flutter 2

#392

Earlier quoted context omitted.

[Flutter Eng. Dir here] We were also not satisfied with the performance of the initial GPay release. We've been working with the GPay team the last couple months and have made significant improvements within both Flutter and the GPay app. Hopefully the next release of GPay will be out soon and others will be able to see the progress we're continuing to make with the team.

Flutter used to be such a great experience, but something happened ~6 months ago that totally derailed it. It brings my late 2016 MBP to a crawl if I am building on iOS simulator. After reading online about it being related to Metal, and needing to switch flutter channels, trying that, and still seeing no success... I just gave up on Flutter (for now). Maybe Flutter 2 has resolved this?

[Flutter Eng. Dir here]

I would love to learn more about your experience. Would you be willing to file an issue and either post it here or CC me on it?

flutter.dev/support

Re: Flutter 2

#393

Earlier quoted context omitted.

I do appreciate your point of view on this, and I hope I did not come across as dismissive of your choice. If it was a thorough evaluation of the capabilities, and it did not seem able to provide the user interactions you needed, I'm sure that is then a reasonable enough basis. My knee-jerk reaction however, was to think this might have been made without properly evaluating the capabilities of the platform. If I head…

Fair enough, and sorry if I seemed a bit combative too. However, I believe "this is a website" or "this is an app" is a perspective the user will take, despite what our intentions as creators were, and so, the safest bet would always be assume what is the norm for the platform, since the user would never be "disappointed" by that even if they expected an app-like feel. On the Web, (at least some, in my anecdata most)…

I'm glad we can be nice, stalking and all :D. I think those are very valid points, and I think Flutter has a much more natural place as a framework for mobile apps, or desktop software. The gallery showcase feels like a half-assed attempt at creating web-site like pages, that as you pointed out, all feel wrong. So using flutter to develop something like that, I think I'd have agreed with you. However, from just the app side, I do feel flutter developers have made the UX very much in line with that of apps. I rarely know if an app is made using flutter, or pure android (as for iOS, I have no clue. The cupertino stuff looks like iOS to me, but I also have no clue).

I'm also not entirely convince that native apps with flutter is a good thing, especially considering that I'll be just another attempt at providing an opinionated UX stack that is completely different from that of the native experience.

So, maybe we agreed more than we thought. I also believe that a native experience, one that matches the otherwise existing UI interactions should be king. Throwing App UX paradigms into website or desktop app bound to feel terrible. Maybe it can be made more enjoyable to use with better configurations more in line with the respective platforms.

Re: Flutter 2

#394

Earlier quoted context omitted.

The accessibility is a bigger concern, but flutterfolio.com also A) lags on my work machine when tabbing through fields B) doesn't handle HDPI screens well (the entire interface looks blurry) C) keeps fields visually indicated as selected even when I click outside of the browser (if I start typing, is it going to go into the field or not?) D) has a separate touch mode? Touch doesn't just work? Looked up another of th…

[Flutter Eng. Dir. here] I really appreciate the feedback. We clearly have more work to do on the Web side of Flutter. Unlike the Mobile side which has shipped 100,000s of apps, the Web side may be up to like 1000. :) So many more issues to address as we work closely with more users to get their apps into production. If you'd like to track progress on any of these, I'd encourage you (or anyone else reading) to please…

The CanvasKit renderer[1] is highly concerning to the general health of the web. It's nice that it's easy for developers, but it remove all the power of the web.

To an end user, their accessibiliy tools, & user extensions, the page might as well be VNC'ed in to some system. Everything is opaque. There's no HTML elements.

I can not state strongly enough how immoral & unethical this path is. Bending the web to the developers will & breaking all the contracts of what a web page is a grevious act, is enormously harmful. This is one of the worst possible things that could happen to the web. Please for god sake don't do this to us. Don't injure the web like this.

This will be raised again and again and again until the ends of time as an incredible black mark on the name of Flutter.

Edit: constructive feedback welcome. Whether it's me or others, folks pointing out this peril often find themselves hit by downvotes as I do now. This seems like an existential challenge for the web, to keep humans able to be in the loop when browsing the internet. We would all love if you would defend or explain or have something to offer in your critiques about this crisis.

[1] https://flutter.dev/docs/development/tools/web-renderers

Re: Flutter 2

#395

Earlier quoted context omitted.

The accessibility is a bigger concern, but flutterfolio.com also A) lags on my work machine when tabbing through fields B) doesn't handle HDPI screens well (the entire interface looks blurry) C) keeps fields visually indicated as selected even when I click outside of the browser (if I start typing, is it going to go into the field or not?) D) has a separate touch mode? Touch doesn't just work? Looked up another of th…

[Flutter Eng. Dir. here] I really appreciate the feedback. We clearly have more work to do on the Web side of Flutter. Unlike the Mobile side which has shipped 100,000s of apps, the Web side may be up to like 1000. :) So many more issues to address as we work closely with more users to get their apps into production. If you'd like to track progress on any of these, I'd encourage you (or anyone else reading) to please…

[Flutter ... here]

Currently I'm counting four or maybe five different HN users in this thread indicating this affiliation. I appreciate this open look into the organization. We're probably getting a more honest idea about what really goes into the sausage. Still, your PM might be less happy about this thread...

Re: Flutter 2

#396
post #20

Earlier quoted context omitted.

Google Pay on the iPhone XS had so much jank and UI lag when I last used it a month ago.

[Flutter Eng. Dir here] I replied above as well. My team has also not been satisfied with the performance of the GPay app on all devices. We've been working with the GPay team since release and made many improvements in both Flutter and the GPay app. I expect there will be an updated GPay app soon, with still more performance improvements in the pipeline.

Maybe publish a Flutter showcase app on both appstores? With Apple's store you'll probably have to jump through some hoops to provide some useful functionality, but it should be doable.

Re: Flutter 2

#397

Earlier quoted context omitted.

History has shown us over and over again, always bet on the web. Sure you might not like JS as a language, you might find CSS confusing and full of warts, etc. but it's here and will be here 20, 50, and 100 years from now. We're not going to just sit up and throw away 25+ years of progress and history on the web overnight. Tech like java applets, flash, silverlight, etc. come and go like fads. Who knows if Google wil…

[Flutter Eng. Dir here] I guess I would like to think we are betting on the web. :) All of the Flutter founders came from Web backgrounds. After years of attempting to make the Mobile web awesome, we forked Chrome and built a new thing. Now we're bringing it back to the Web. The web is a big tent. I think there is a lot of room for innovation here. We're attempting with Flutter to push on some of the newer aspects of…

When Chrome has become synonymous with the Web :facepalm:

Re: Flutter 2

#398
post #64

The idea sounds very appealing, especially to an indie developer: being able to ship your app on multiple platforms from a single codebase is kind of the holy grail. Unfortunately, the result is.... I tested this Flutter example[1], on a 16" MBP with and i7, and it is janky as it can get, it feels like I'm using a 15 year old computer. From the code it looks like the whole thing is... rendered on canvas? I'll pass. […

Well, to give counterpoint, just tested on Chrome / Windows (ok-ish CPU, decent GPU) all demos are buttery smooth no lag or jank whatsoever.

Just tested https://gallery.flutter.dev/#/crane in Chrome and Safari on Mac and if I go to another tab and then back to the fly tab it just shows a gray screen. Does not inspire confidence.

Re: Flutter 2

#399

Earlier quoted context omitted.

Are you a native mobile developer? I am (was I'm moving to ML/AI/Data engineering) and I don't think flutter is in any way easier or nicer than the native toolchains for mobile. Both Swift and Kotlin are better languages than Dart IMO, the IDE and tooling is far superior for both also. Flutter is faster but once to deploy a substandard quality of app for sure but matching the quality of a native app? That takes just…

If you had to pick a multiplatform solution (for whatever reason) which one would you pick? I've been exploring this space a bit, and it's really hard to form an opinion on this.

I've been in that situation 3 times, I choose React Native and Flutter each once. I was forced to use Ionic. I would NEVER use Ionic again, terrible experience and very difficult to get decent quality/performance. I like Flutter's technology much more. I like that it is natively compiled. I dislike that it has it's own UI toolkit. React Native with TypeScript is a highly productive environment but I LOATHED the developer experience and any code that had performance goals was way harder to be successful with, not impossible but the threading model that RN imposes (it doesn't really thread at all) was hard to make the UI snappy and crisp as it should be. I've played with Xamarin also since I was a .net dev for 10+ years (I'm old in the industry 25 years now) and the developer experience was actually pretty good but the compile times and the UI performance were not. Though that was not a production level app and I might have been able to make it work.

tldr; If I HAD to do cross platform I'd use the following logic to choice one: If I have a team of react JS/TS devs: React Native else if I have a .net team: Xaramin else: Flutter

Then I'd apply for a job writing native apps in Swift/Kotlin and run away ;)

Re: Flutter 2

#400

I'm currently 5 months into developing a mobile app for a startup with flutter and my experience so far is very underwhelming. Flutter as a framework is not the worst but far from best, it's very OO while trying to use reacts vdom model which just wants to be functional. The biggest limitation of the platform is Dart - it's a horrible language that should have died once TS and ES6 became mature enough. And I've used…

Would have been be nice if they provided a way to use Kotlin Native as a language for Flutter instead. Not a JVM Kotlin of course, because it's too slow for the native mobile apps. Or, even better, Rust. That would be very impressive.
Post reply on HN