Confusion with the use of CupertinoApp and MaterialApp in Flutter

Material widgets implements the Material design language for iOS, Android, and web.

Cupertino widgets implements the current iOS design language based on Apple’s Human Interface Guidelines.

Why write a Cupertino app?

The Material design language was created for any platform, not just Android. When you write a Material app in Flutter, it has the Material look and feel on all devices, even iOS. If you want your app to look like a standard iOS-styled app, then you would use the Cupertino library.

You can technically run a Cupertino app on either Android or iOS, but (due to licensing issues) Cupertino won’t have the correct fonts on Android. For this reason, use an iOS-specific device when writing a Cupertino app.

You’ll implement a Cupertino style shopping app containing three tabs: one for the product list, one for a product search, and one for the shopping cart.

If you wish to read more on Cupertino and Material. Check the link below:

Cupertino and Material

You can also use a flutter package called flutter_platform_widgets to check which platform your app is running on and use specific widgets(either Material or Cupertino)

This package link is : flutter_platform_widgets

I hope this helps

Leave a Comment