What is the difference between Cupertino and Material Design in Flutter?
#design#cupertino#material
Answer
Overview
Flutter supports two design languages: Material Design (Google's design system) and Cupertino (Apple's iOS design system). You can use either — or mix both — in a Flutter app.
Key Differences
| Feature | Material Design | Cupertino (iOS) |
|---|---|---|
| Platform | Android / Cross-platform | iOS look & feel |
| Root widget | text | text |
| Button | text | text |
| Navigation bar | text | text |
| Tab bar | text | text |
| Alert | text | text |
| Switch | text | text |
| Slider | text | text |
| Loading | text | text |
| Picker | text | text |
| Page route | Slide from bottom | Slide from right |
Material Example
dartMaterialApp( home: Scaffold( appBar: AppBar(title: Text('Material')), body: Center( child: ElevatedButton( onPressed: () {}, child: Text('Material Button'), ), ), ), )
Cupertino Example
dartCupertinoApp( home: CupertinoPageScaffold( navigationBar: CupertinoNavigationBar( middle: Text('Cupertino'), ), child: Center( child: CupertinoButton( onPressed: () {}, child: Text('iOS Button'), ), ), ), )
Mixing Both (Adaptive Widgets)
Flutter provides adaptive widgets that automatically use the right style per platform:
dart// Adaptive switch — renders Material on Android, Cupertino on iOS Switch.adaptive( value: _isOn, onChanged: (val) => setState(() => _isOn = val), ) // Check platform manually import 'dart:io' show Platform; Widget buildButton() { if (Platform.isIOS) { return CupertinoButton(onPressed: () {}, child: Text('iOS')); } return ElevatedButton(onPressed: () {}, child: Text('Android')); }
Adaptive Widgets Available
| Widget | Adaptive Version |
|---|---|
text | text |
text | text |
text | text |
text | text |
text | text |
When to Use Which?
| Scenario | Use |
|---|---|
| Standard cross-platform app | Material (default) |
| App targeting iOS users specifically | Cupertino |
| Match native iOS design | Cupertino |
| Corporate/enterprise apps | Material |
| Platform-specific feel | Mix both using adaptive widgets |
Recommendation: Use Material for most Flutter apps as it provides better cross-platform consistency. Add specific Cupertino widgets when you need iOS-native look for particular components.