Live data from Hacker News

Flutter 2

developers.googleblog.com

411–420 of 780 posts

Re: Flutter 2

#411

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…

The proper analog to union types in Dart (as in Java) is enums and / or church-encoding [I think that's the term] generalized algebraic data types (GADTs). E. g. something like this: https://gist.github.com/jbgi/208a1733f15cdcf78eb5

Scala 2 also had `sealed` classes that could be used in places where you needed enums parameterized by runtime values and that's been generalized in Scala 3 IIRC.

Re: Flutter 2

#412

Earlier quoted context omitted.

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 devel…

> a job writing native apps

Sadly, a shrinking market day by day.

Re: Flutter 2

#413
post #127
post #41

> Google Pay switched to Flutter a few months ago for their flagship mobile app, and they already achieved major gains in productivity and quality. By unifying the codebase, the team removed feature disparity between platforms and eliminated over half a million lines of code. from pay.google.com > Starting April 5, you won't be able to use pay.google.com to send and receive money from other people. To send and receiv…

The new Google Pay app on iOS is incredibly sluggish -- animations stutter, switching pages has hesitations. I'm not sure what they mean by "quality" in this case.

On Android too. It literally takes 15-20s for it to charge enough for me to be able to select anything.

Re: Flutter 2

#414

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…

[Disclaimer: I work on the Dart team.]

The TS code indeed looks cool. This is an area we're looking at.

One point, though: we try to be very careful to not regress performance or developer iteration time (e.g., type checking time) when we introduce new language features. E.g., structural typing can be more expensive in general to type check since we need to recurse.

Re: Flutter 2

#415

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…

Read somewhere flutter canvas rendering was only a first « quick n dirty » way of rendering something on the web, but a true DOM renderer was the end goal.

Can you give more info on that ?

Another question i’ve always had about flutter : last time i explained how this tech looked promising, a friend asked me about performance. I said « they said it’s really good and smooth ». But then we tried the iOS demo app (something very basic about vegetables) from the app store, and the scrolling performance was a total disaster (on an iphone x).

Do you have an explanation for the discrepancy between the official ad one can read on google blogs, and the real-world experience of app developped with flutter ?

Re: Flutter 2

#416
Flutter is not for everything, but it is really worth a look.

We (AU MVNO/Telco) recently converted iOS and Android apps (200,000 MAUs) to Flutter and it has been game changing. We had experimented with react native and found it just didn't deliver. Flutter is different. On mobile platforms the experience is super responsive and smooth and for your typical consumer app indistinguishable from the native experience. The tooling and developer experience are incredible. The benefits and experience where so clear that the whole team was onboard - including the most die-hard career platform specialists. Our velocity and ability to deliver is measurably better.

We're looking at the web target as maybe "good enough". I don't think it could be a replacement for a well-crafted web app, but could be used to provide a fast alternative to the primary native experience, and for rapidly prototyping and experimenting. In the current state, Flutter Web could never replace our highly optimised ecommerce funnel - some things you just need to sweat the details. But it's definitely better than some of the CX in the corners of our legacy applications. Shipping fast is valuable - so build for native, get a good enough web for "free" and then spend time and attention on the web if it is warranted.

Re: Flutter 2

#417
post #196
post #170

Earlier quoted context omitted.

So now every website will require enabled WebAssembly to run god knows what code and I will have to install an anti-virus for my browser? No thanks. JS might be a bad language, but it's even worse in how it's abused with frameworks, tracking, etc for no good reason. edit: funny how I can discuss extremely controversial political topics here and never have any of my comments killed, but having a negative opinion about…

Wasm can't do anything JS couldn't do already.

There are a few things that WASM can do that JS can't (at least not now):

- Memory management without GC - Unboxed data structures - SIMD - Shared-memory multi-threading - Precompiled snapshots (does not need to be recompiled on page reload)

Re: Flutter 2

#418

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.

Thanks. Not related to Flutter but Google in general: I recently hit a hard-to-reproduce bug with Jetpack's LiveData for which there's already an open issue created by a third-party developer. I don't recall but it had been open since 2018 with no updates whatsoever from Google engineers on its progress. And therein lies a frustrating problem for engineers not working at Google but using Google tech. There is simply…

Android development is like that; you hit a framework bug, you'll expect it will never get fixed. Just find a workaround and accept it's what it is.

Re: Flutter 2

#419

Earlier quoted context omitted.

We're nagging because the apps suck and stick out like a sore thumb. Maybe Flutter will be the one to get there and be the holy grail of cross platform UI development, but the developer community has been burned by this promise so many times, we're going to have to see the final product before getting excited. Just because a project is ambitious doesn't mean we should all jump on board, particularly when similar proj…

I don't understand why more resources aren't being put into Qt and making that easier to use or building a more "web-developer-friendly" abstraction layer on top.

QT isn't neccesarily a crowd pleaser, and in 2020 it's starting to look a little long in the tooth. Don't get me wrong though, I love QT on the desktop, and it powers some of my favorite software out there. Ultimately though, I don't think QT's fate is on the web.

Re: Flutter 2

#420
post #65

Pretty sure I'm the only person on this thread who loves flutter. We use flutter web and Firebase for our hobbyist project, and the results have been simply amazing. Dart makes Typescript look like a joke. The build system alone makes flutter better than React Native ! I'm confident in being able to build any CRUD app in dart Edit, in fact how many of you have actually built a project in flutter .I can't believe anyo…

All of the complaints about flutter I see here are based on people using apps built with flutter, and not about the development experience. "Have you actually build a project in flutter?" is a total non-sequitor response to complaints about how even the official demo is miserable to use.

Would you not buy a screwdriver because some people with that screwdriver don't build chairs correctly ?

Like with Unity, the power of cross-platform development leads many to just assume apps work across platforms automatically. This is absolutely not the case, you need to properly QA any code you write and code it to accommodate each platform's quirks.

Post reply on HN