r/FlutterDev • • Nov 08 '22

Discussion Flutter 4.0?

The Flutter team just released this tweet on their official page. What should we expect?

118 Upvotes

120 comments sorted by

View all comments

45

u/albemala Nov 08 '22

It'll probably have full Material 3 support as well

-4

u/azzecca-garbugli Nov 08 '22

Indeed, they have done huge steps about this topic. Maybe they could consider also to "deprecate" Material 2 at this point...

0

u/[deleted] Nov 08 '22

[deleted]

9

u/Abion47 Nov 09 '22

What would you have them do? Ship Flutter without a default out-of-the-box theme? You can already see how that looks by using the widgets from import "package:flutter/widgets.dart"; and have the base of your app be WidgetsApp instead of MaterialApp or CupertinoApp. It looks awful and you have to customize everything. Most people using Flutter will want to use a default style, so it makes sense to ship the style alongside the standard library. Really, the fact that they support both Material and Cupertino out of the box is already commendable. But if you really want to, you can make an app without using either Material or Cupertino.

0

u/[deleted] Nov 09 '22

[deleted]

0

u/Abion47 Nov 09 '22

There's some truth to that, but it's not like Android/iOS native components are updated so frequently that needing to be able to work on Material/Cupertino widgets separately from the core Flutter releases would result in that much benefit. Combine that with the fact that those packages would need to be updated in parallel with every Flutter release anyway, and it just makes more sense in practice to bundle them with Flutter itself.

Perhaps it would be a nice addition to flutter create that you could specify if you were intending to make a Material or Cupertino targeted app (e.g. flutter create --theme=cupertino), but beyond that, I wouldn't think that any solution separating those themes from the core library wouldn't end up causing more problems than solutions. Tree-shaking already ensures that the theme you don't choose doesn't end up in the final compiled app, so the only real problem is the size of the SDK installation which isn't really that big of a problem.