title: multi Provider doesn't work in material app in flutter?
body: <p>I've created an app and I have used MultiProvider but it doesn't work when I use it inside MaterialApp </p>
  
  <p>I want to use it to change app theme color but </p>
  
  <p>it gives me an error:</p>
  
  <p>*Note: when I use posts provider in any other screen it works.</p>
  
  <p>My Code:</p>
  
  <pre class="lang-dart prettyprint-override"><code>import 'package:blog_app/provider/posts.dart';
  import 'package:blog_app/provider/settings.dart';
  import 'package:blog_app/screens/splash_screen.dart';
  import 'package:flutter/material.dart';
  import 'package:provider/provider.dart';
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MultiProvider(
        providers: [
          ChangeNotifierProvider&lt;Posts&gt;(
            builder: (context) =&gt; Posts(),
          ),
          ChangeNotifierProvider&lt;Settings&gt;(
            builder: (context) =&gt; Settings(),
          ),
        ],
        child: MaterialApp(
          darkTheme: Provider.of&lt;Settings&gt;(context).darkModeEnabled ? ThemeData.dark() : ThemeData.light(),
          debugShowCheckedModeBanner: false,
          title: 'Blogy',
          theme: ThemeData(
            primaryColor: Colors.deepPurple[900],
            cursorColor: Colors.deepPurple[900],
            accentColor: Colors.deepPurple[900],
            fontFamily: 'Ubuntu',
          ),
          home: SplashScreen(),
        ),
      );
    }
  }
  
  </code></pre>
  
  <p>The Error :-</p>
  
  <pre><code>I/flutter ( 9316): The following ProviderNotFoundError was thrown building MyApp(dirty):
  I/flutter ( 9316): Error: Could not find the correct Provider&lt;Settings&gt; above this MyApp Widget
  I/flutter ( 9316):
  I/flutter ( 9316): To fix, please:
  I/flutter ( 9316):
  I/flutter ( 9316):   * Ensure the Provider&lt;Settings&gt; is an ancestor to this MyApp Widget
  I/flutter ( 9316):   * Provide types to Provider&lt;Settings&gt;
  I/flutter ( 9316):   * Provide types to Consumer&lt;Settings&gt;
  I/flutter ( 9316):   * Provide types to Provider.of&lt;Settings&gt;()
  
  </code></pre>