Question #330EasyWidgets & UI

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

FeatureMaterial DesignCupertino (iOS)
PlatformAndroid / Cross-platformiOS look & feel
Root widget
text
MaterialApp
text
CupertinoApp
Button
text
ElevatedButton
text
CupertinoButton
Navigation bar
text
AppBar
text
CupertinoNavigationBar
Tab bar
text
BottomNavigationBar
text
CupertinoTabBar
Alert
text
AlertDialog
text
CupertinoAlertDialog
Switch
text
Switch
text
CupertinoSwitch
Slider
text
Slider
text
CupertinoSlider
Loading
text
CircularProgressIndicator
text
CupertinoActivityIndicator
Picker
text
DropdownButton
text
CupertinoPicker
Page routeSlide from bottomSlide from right

Material Example

dart
MaterialApp(
  home: Scaffold(
    appBar: AppBar(title: Text('Material')),
    body: Center(
      child: ElevatedButton(
        onPressed: () {},
        child: Text('Material Button'),
      ),
    ),
  ),
)

Cupertino Example

dart
CupertinoApp(
  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

WidgetAdaptive Version
text
Switch
text
Switch.adaptive
text
Slider
text
Slider.adaptive
text
CircularProgressIndicator
text
CircularProgressIndicator.adaptive
text
AlertDialog
text
AlertDialog.adaptive
text
Checkbox
text
Checkbox.adaptive

When to Use Which?

ScenarioUse
Standard cross-platform appMaterial (default)
App targeting iOS users specificallyCupertino
Match native iOS designCupertino
Corporate/enterprise appsMaterial
Platform-specific feelMix 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.