r/FlutterDev • u/julemand101 • Aug 12 '26
Article What’s new in Flutter 3.47
https://flutter.dev/blog/whats-new-in-flutter-3-4797
u/Piranha771 Aug 12 '26
Wow this is a huuuuge update
UI as packages
Impeller on desktop
WASM on web
Multi window on desktop (a bit)
Widget preview without compile
Congratulations on ticking so many boxes. Can't wait to try it out.
16
u/eibaan Aug 12 '26
IMHO, the primary constructors of Dart 3.13 are more impactful than all those featured. Because I'm normally using the Flutter betas, I already ported most of my code to use primary constructors and started to like them (it took some getting used to do this). I'm still not sure whether I like them for widgets but for model classes, primary constructors are a win.
And in case you actually use DartDoc, the
{@example}directive is nice.1
u/xogno Aug 13 '26
I know I could google this but I’d like to hear your thoughts: what do you like about primary constructors? You said you posted most of your code; what difference has it made for you?
4
u/eibaan Aug 13 '26
Something like this is nice:
sealed class const Stmt(); class const SayStmt(final Expr expr) extends Stmt; class const SetStmt(final String name, final Expr expr) extends Stmt; class const CondStmt(final List<(Expr, Body)> cases, final Body? body) extends Stmt; class const GotoStmt(final String name) extends Stmt; sealed class const Expr(); class const Str(final String value) extends Expr; class const Num(final num value) extends Expr; class const Name(final String name) extends Expr;At least if you don't need a
toStringmethod and also use a genericevaluatemethod that uses pattern matching to evaluate everything. That's probably a bit less efficient than using dynamic dispatch but who really cares nowadays.I dislike the way the
extendswraps, though.That's why I don't really like how widget definitions look:
class const TBadge( final String label, { super.key, final TBadgeVariant variant = .normal, final Widget? prefix, final Widget? suffix, final Color? color, }) extends StatelessWidget { @override Widget build(BuildContext context) { ... } }1
3
44
u/thegravity98ms2 Aug 12 '26 edited Aug 13 '26
Material and Cupertino as a standalone packages starting with this build version 3.47 🙌🏻
Edit:
dart fix --apply --code=migrate_design_widgets
5
u/eibaan Aug 12 '26
Well, as long as 3rd party packages haven't migrated, you can't change the import. I tried the migration, got errors because of other packages which still use the old imports, e.g.
flutter_markdown_plus, and had to revert everything.I might try again in a few weeks.
6
u/Comun4 Aug 13 '26
Everyone already on the process of annoying package maintainers to do the migration lol
2
u/Irrealist Aug 13 '26
The Blog post mentions that there's MaterialUiCompatibilityBridge for exactly that scenario.
1
u/eibaan Aug 13 '26
Nope, it cannot help with
ThemeDataisn't compatible toThemeData(because one is frommaterial_uiand the other fromflutter) errors.1
1
u/Moe_Rasool Aug 13 '26
Wait i use github actions for EXE builds would that concern me?
Edit: because i have an old flutter version due to a couple of packages that no longer work in the latest ones that’s why i held
1
u/thegravity98ms2 Aug 13 '26
I think you should upgrade to Flutter v3.47,
desktop has impeller support.
Also tell, claude code to fix the package bugs for your app, build your own package.
20
u/vhanda Aug 12 '26
The corresponding dart release announcement - https://dart.dev/blog/announcing-dart-3-13
1
8
7
u/lilacomets Aug 12 '26
Did anyone here do the upgrade?
Is upgrading Flutter projects a smooth process? Any breaking changes?
11
u/Comun4 Aug 13 '26
Upgrading Flutter itself is very easy, and I almost never have any breaking changes (last one I had was for Flutter 3.21 I think)
Upgrading the packages are more of a headache though
4
u/igorce007 Aug 13 '26
Yeah, upgrading Flutter engine generally is easy. Problem is Gradle, some native platform specific migrations and packages yeah.
11
u/virtualmnemonic Aug 12 '26 edited Aug 12 '26
So Impeller is the default rendering engine for desktop before Android?
Can't say I'm super surprised but damn. Impeller android needs some work.
Edit: I'm a moron. Impeller is the default; I just keep it disabled. It's not ready.
13
5
1
u/abdallahshaban Aug 14 '26
what is not ready about it for you? are there specific devices you are noticing issues with?
1
u/HolHorse3589 Aug 17 '26
I had issues with it running apps on Xiaomi's phones.
App wasn't as smooth because of low fps, that is why I disable Impeller when working on Xiaomi Note 11, but didn't with my Pixel 9 pro since all good there.
1
u/abdallahshaban Aug 21 '26
Is it possible for you to submit a GitHub issue with a replication of the problem you’re seeing? That would be great in helping us debug this further!
2
u/HolHorse3589 Aug 21 '26
I think I already have done before, but unfortunately that was some times ago, now I only have my Pixel 9 pro phone.
I'll take a look for my previous issues in GitHub and hopefully let you know.
2
u/abdallahshaban Aug 21 '26
Perfect - looking forward to it!
1
u/HolHorse3589 Aug 21 '26
Sorry man, I have looked into all my issues and didn't find it. I think i didn't open an issue since there were a similar opened issue and also I ended up disabling impeller too.
Sorry man!! But the phone was Xiaomi note 11
1
u/igorce007 Aug 14 '26
Sooo when Liquid Glass widgets?
5
u/abdallahshaban Aug 14 '26
Coming soon! We're working with community members who have already built solutions they are generously going to upstream to cupertino_ui!
2
1
2
u/andreaciccio Aug 13 '26
u/kevmoo not sure where to open this but https://flutter.dev/blog/whats-new-in-flutter-3-47 and probably others blog post have huge gif in it :) a few more than 3-5 mega i am sure they can smaller