title: Flutter Cupertino/Material combined Theme / shared font family
body: <p>I've been trying to solve a couple of problems using both Material and Cupertino widgets. </p>
  
  <p>1) I can't seem to figure out how to globally define a font family for both. Either I use a <code>CupertinoApp</code> and have the Cupertino widgets correct or <code>MaterialApp</code> and have the Material theme widgets correct.</p>
  
  <p>2) How do I define the Cupertino <code>primaryColor</code> attribute without a <code>CupertinoTheme</code>?</p>
  
  <p>I've found something called MaterialBasedCupertinoThemeData but I'm not sure how it works / can't find any docs/tutorials on it.</p>
  
  <p>I can't find any other questions on the subject and would appreciate the help!</p>
  
  <pre><code>  @override
    Widget build(BuildContext context) {
      return CupertinoApp(
        title: 'betterfriend',
        debugShowCheckedModeBanner: false,
        // This lets us use material components
        localizationsDelegates: &lt;LocalizationsDelegate&lt;dynamic&gt;&gt;[
          DefaultMaterialLocalizations.delegate,
          DefaultWidgetsLocalizations.delegate,
          DefaultCupertinoLocalizations.delegate,
        ],
  
        home: CupertinoTheme(
          data: MaterialBasedCupertinoThemeData(
            materialTheme: ThemeData(textTheme: Styles.textTheme),
          ),
          child: ScreenSwitcher(),
        ),
      );
    }
  </code></pre>