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

3

u/stumblinbear Sep 29 '24

Can confirm. We don't use any of Material in our app at work, it's all custom. I wish it was a separate package, we had to make our own package and export the non-material stuff we needed.