Live data from Hacker News

Flutter 3

docs.flutter.dev

111–120 of 453 posts

Re: Flutter 3

#111

Honestly I think browsers (desktop and mobile) will implement native apis faster than these things will implement native apis. TLDR: JavaScript and browser apis will win in the end.

I use Flutter as a way to host a sqlite and business logic and render all UI in a local webview for this reason. Just testing now, but works OK.

Re: Flutter 3

#112
post #93

Earlier quoted context omitted.

Not OP - but almost all of the Flutter work I've ran into is mobile-centric. If you're looking for cross-platform on the desktop it really hasn't been a popular option vs. Electron/Qt.

Given that "Today, we are excited to announce that Flutter is now stable for macOS and Linux, in addition to Windows!" thats not surprising

Of course, and to be clear I'm excited there are more cross-platform options even though I've had a reluctant history with Dart.

Re: Flutter 3

#113
Congrats! Flutter is such an amazingly crazy concept that when I started my current job it was on the condition that I could learn and use it for our app. I'm not regretting it in the slightest. In fact I get more impressed with it the more I use it. Great job!

Re: Flutter 3

#114
post #90

Earlier quoted context omitted.

I’m confused, do you not use desktop apps?

How many new desktop apps do you use (first released in the past ~5 years or so), and how many of them aren't Electron? Desktop GUI software is a pretty small niche. The web has eaten nearly everything, and games don't use native UI stuff.

yes, the only market for new apps would be CLI, games and scientific computing/technical niches

Re: Flutter 3

#115
post #27

Flutter 3 comes with an upgrade to Dart 2.17 [1], which has quite a few improvements as well... including state on enums. While that's great, I was hoping it would be like in Rust, where each enum variant can declare its own state components, but unfortunately it seems to be more like Java: same state for all variants. Well, at least there's quite a few other small but useful improvements... and they showed how they…

> While that's great, I was hoping it would be like in Rust, where each enum variant can declare its own state components, but unfortunately it seems to be more like Java: same state for all variants.

Yes, the enhanced enums we shipped in 2.17 are like Java enums.

We are also working on support for pattern matching and algebraic datatype-style programming: https://github.com/dart-lang/language/blob/master/working/05...

I say "style" here because object-oriented languages like Dart can already mostly model sum types using subclasses. What you need to get the rest of the way there is basically just:

1. Sealed types so that the compiler can check for exhaustiveness when you match over all of the subclasses.

2. A nice pattern matching syntax to let you discriminate between the subclasses and destructure them.

3. Ideally, a nice lightweight syntax for defining a sum type family as a superclass and set of subclasses, though this is relatively less critical.

We're hard at work on this, but pattern matching in general is a pretty large feature and retrofitting it into a language whose syntax wasn't initially designed around it is a challenge.

I'm very excited about macros too. That's another large, difficult feature, but one that I hope will provide a lot of power to users and make the entire ecosystem more valuable over time.

Re: Flutter 3

#116
In case any Flutter engineer/PM is watching this thread, any update on when the Material 3 components will be released?

I have an iOS Flutter app that's getting pretty popular in its niche, but I'm waiting on the Material 3 components to be there to release an Android version.

Re: Flutter 3

#117

Despite many maturity issues in practice Flutter is the only realistic option for true cross platform UIs that run everywhere. Apart from Qt , but the licensing issue is a hindrance. And yes, the web backend isn't ideal, but it will improve over time. I just wish Google had built Flutter on a low level core that isn't tied to Dart, so it would be usable from other languages. Dart isn't horrible and is getting better,…

> Despite many maturity issues in practice Flutter is the only realistic option for true cross platform UIs that run everywhere.

What are your thoughts on flutter vs react native?

(assuming you're only targeting phones)

Re: Flutter 3

#119

Earlier quoted context omitted.

no the feature you're looking for is sealed classes, see e.g. Kotlin. Rust enum variants cannot be externally defined classes

That's completely orthogonal to ADT vs enum.

Enums enable two things: check current type from union of types and exhaustivity check in switch

The former is solved by reflection, the latter by sealed classes.

Re: Flutter 3

#120

We have a react native app and sometimes it fails to build. We go to lunch, and come back no code change now it builds. I'm just sick of the NPM/Javascript bullshit. Does Flutter avoid all of these kinds of issues? I'm this close to scrapping the whole thing.

I never coded React Native, but I have a lot of experience with Flutter. You can definitely run into build issues, but it's almost exclusively when doing precarious things like upgrading third party packages, SDKs or Flutter versions. As soon as you've traversed the depths of dependency hell and it builds, it builds without a hitch repeatedly in my experience. As the framework is maturing there have been some major t…

As someone with a lot of Flutter experience, I can second this. It usually works pretty reliably until someday you upgrade and cocoapods keeps complaining even when you clean everything and rebuild.
Post reply on HN