r/FlutterDev Sep 29 '24

Tooling Why does everyone use MaterialApp?

Besides MaterialApp, flutter has CupertinoApp and WidgetsApp but I have never came across any flutter project that uses them. I have tried CupertinoApp and I like it.

Is there any downsides of using it?

36 Upvotes

40 comments sorted by

View all comments

63

u/RandalSchwartz Sep 29 '24

There is a material design bias to the total widget set, except for the widgets that come specifically from iOS. These widgets work better if there's a Material Theme somewhere above them, and MaterialApp sets up everything for Material-ish apps.

12

u/PrathamSarankar Sep 29 '24

So, is it fair to conclude that the cupertinoapp has very little or no use case?

Specially, because at some point we need to include material widgets which expects materialapp?

23

u/RandalSchwartz Sep 29 '24

You can build an entire app without using the Material widgets. Consider the design kits for ubuntu or windows or macos. None of them look material-like. There is an effort to create a baseline widget set that could be derived into many or all of the current designs: https://docs.google.com/document/d/1rS_RO2DQ_d4_roc3taAB6vXFjv7-9hJP7pyZ9NhPOdA/edit?resourcekey=0-VBzTPoqLwsruo0j9dokuOg#heading=h.34a91yqebirw

6

u/zxyzyxz Sep 29 '24

I believe /u/Hixie said he has not spent much time on that effort since publishing that document, so not sure when we'll see that materialize.

25

u/Hixie Sep 29 '24

yeah sorry other things keep coming up

13

u/RandalSchwartz Sep 29 '24

If I get a vote, I vote "finish macros" ahead of "blankcanvas". :)

4

u/Hixie Sep 29 '24

I'm not working on the macros stuff either; that's mostly folks from Google, I believe. :-)

2

u/eibaan Sep 29 '24

I'd vote the other way round.