Live data from Hacker News

Flutter 2

developers.googleblog.com

441–450 of 780 posts

Re: Flutter 2

#441

Earlier quoted context omitted.

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.

I'm certainly confused now whether or not we are talking about the same thing. Without delving to much on the use of the word "union", how would you solve the use case presented in the typescript examples using enums?

Re: Flutter 2

#442

I created apps in cordova, react native and now flutter and I have to say flutter beats both by a lot. It's just been such a nice experience. I'm absolutely in love. My most successful app in flutter is https://stockevents.app if you want to try.

The app looks nice but scrolling feels incredibly weird on my iPhone XS Max. Did you write some custom scrolling logic or is that just how scroll views are in flutter?

There’s a bit of chop in the scrolling and it feels completely linear, instead of elastic like native iOS apps feel (and websites).

Re: Flutter 2

#443
post #380

I've been writing a desktop app using Flutter and couldn't be happier honestly. The widget pattern makes sense, the bloc library does what it's supposed to do, and just building an app is mostly on you. My blossoming love of Dart has also been a nice but welcome surprise. It has a couple weird spots and irritations, but so does literally everything else... It works well for the problem space its used in and has the n…

Show me any flutter app you want and I'll find a problem with a list view.

I’m still having a hard time believing any « flutter is so great for me » testimonies, because my personnal experience with app having only the most basic list screen has always between a disaster. There’s such a big discrepancy between those testimonies and my experience that i’m starting to become suspicious about their authenticities

Re: Flutter 2

#444
post #313

Reading all the comments it sounds like Flutter is exactly what I feared would come out of things like WebAssembly - a trojan horse to bypass web standards and turn the browser into a shell for shipping applications that put all the power back in the hands of application vendors and take away the power that open standards give to users (portability, accessibility, customisability, interoperability etc etc). Of course…

(I was previous editor of the HTML standard for ~10 years, now I'm the Flutter TL)

I mean... you're not wrong. But let's be honest, we never managed to really deliver on the web's promise here. It was and in the 90s, it's WebGL+Wasm now, but the reality is we've never succeeded at true portability (ever tried going to a non-trivial site in lynx? or a web app on your phone?) or accessibility (just ask anyone who uses a screen reader how accessible the web truly is) or customisability (have you _tried_ creating a user style sheet?) or interoperability (I spent a literal decade just trying to clean up the mess around HTML parsing and that was the success story!).

Re: Flutter 2

#445

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…

I don't understand how breaking accessibility with Flutter wouldn't mean that companies that use it on the web are violating the ADA.

Re: Flutter 2

#446

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…

What are your thoughts on the business end of deciding to build two separate versions of the app in two languages (not to mention the web) vs the efficiencies of one code base? We're close to needing to make this decision and I'm real hesitant to introduce two additional languages (we're already React for the web but haven't build apps yet) vs a React Native app where our team can be immediately productive.

I was with a team that went the React Native route. At first it was fine until we had to go slightly off the rails.. and I was rebuilding .so files based off random gists and updating linkage assemblies.

React Native works until it doesn't and then you are getting into very detailed platform specific territory.

A lot of the cross platform promises were untrue - we quickly learned the importance of QAing both builds and frequently had platform specific patches.

Just bite the bullet and go native upfront.

Re: Flutter 2

#447
post #277
post #126

Earlier quoted context omitted.

We actually did try that as our first approach, but it really didn't give you the flexibility that Flutter developers expect. As the erstwhile editor of the HTML standard for ~10 years and the now TL of Flutter I must admit that it's weird to be creating a web framework that completely ignores all the HTML stuff I worked on before. :-) That said, Flutter is different from Flash in some important ways. Flash used the…

Well, good luck maintaining all of that 10 years from now. I can bet on the web being around, well developed and maintained in 2031.

I'm not really sure what you mean by "all of that". What I described _is_ the web.

Re: Flutter 2

#448
post #126

Earlier quoted context omitted.

We actually did try that as our first approach, but it really didn't give you the flexibility that Flutter developers expect. As the erstwhile editor of the HTML standard for ~10 years and the now TL of Flutter I must admit that it's weird to be creating a web framework that completely ignores all the HTML stuff I worked on before. :-) That said, Flutter is different from Flash in some important ways. Flash used the…

Really not fair to compare against flash in this way when wasm wasn’t available and npapi was the only option. That is additionally an implementation detail, Adobe could (theoretically) revive and port flash to wasm today without breaking the majority of applications.

I would have had much less of a problem with Flash if it had been a runtime built with web technologies like that.

Re: Flutter 2

#449

I created apps in cordova, react native and now flutter and I have to say flutter beats both by a lot. It's just been such a nice experience. I'm absolutely in love. My most successful app in flutter is https://stockevents.app if you want to try.

The app looks nice but scrolling feels incredibly weird on my iPhone XS Max. Did you write some custom scrolling logic or is that just how scroll views are in flutter? There’s a bit of chop in the scrolling and it feels completely linear, instead of elastic like native iOS apps feel (and websites).

Oh thanks a lot for letting me know. I will investigate this, since I really don't know.

Re: Flutter 2

#450

I want to love Flutter. But once looking at it, it's a no go. It's the new flash. Really, you cannot copy the text anymore. React native is my goto solution now.

Flutter team member here. In Flutter, the developer consciously decides which text should be selectable (and thus copy/paste'able), so while it's true that text is not inherently selectable in a Flutter app, text that the app developer decided to make selectable will be.

Wow, that is a remarkably terrible default behavior. Virtually all other platforms behave in the opposite manner.

If the goal of the environment is to provide a new standard for cross-platform development, your default behaviors are extremely important decisions.

Post reply on HN