title: Why im getting provider error in project?
body: <p>Im getting this error when im trying to use provider in my code .
  IN new in flutter and a beginner so maybe anyone can explain how to fix I search already but still cannot find something.</p>
  <pre><code>The following ProviderNotFoundException was thrown building MeinAccount(dirty, state: _MeinAccountState#e2cbb):
  Error: Could not find the correct Provider&lt;User&gt; above this MeinAccount Widget
  
  This happens because you used a `BuildContext` that does not include the provider
  of your choice. There are a few common scenarios:
  
  - You added a new provider in your `main.dart` and performed a hot-reload.
    To fix, perform a hot-restart.
  
  - The provider you are trying to read is in a different route.
  
    Providers are &quot;scoped&quot;. So if you insert of provider inside a route, then
    other routes will not be able to access that provider.
  
  - You used a `BuildContext` that is an ancestor of the provider you are trying to read.
  
    Make sure that MeinAccount is under your MultiProvider/Provider&lt;User&gt;.
    This usually happens when you are creating a provider and trying to read it immediately.
  
    For example, instead of:
  
    
    Widget build(BuildContext context) {
      return Provider&lt;Example&gt;(
        create: (_) =&gt; Example(),
        // Will throw a ProviderNotFoundError, because `context` is associated
        // to the widget that is the parent of `Provider&lt;Example&gt;`
        child: Text(context.watch&lt;Example&gt;()),
      ),
    }
    
  
    consider using `builder` like so:
  
    
    Widget build(BuildContext context) {
      return Provider&lt;Example&gt;(
        create: (_) =&gt; Example(),
        // we use `builder` to obtain a new `BuildContext` that has access to the provider
        builder: (context) {
          // No longer throws
          return Text(context.watch&lt;Example&gt;()),
        }
      ),
    }
  
  If none of these solutions work, consider asking for help on StackOverflow:
  
  https://stackoverflow.com/questions/tagged/flutter
  
  The relevant error-causing widget was: 
    MeinAccount file:///Users/myname/StudioProjects/projectname/lib/main.dart:48:41
  When the exception was thrown, this was the stack: 
  #0      Provider._inheritedElementOf (package:provider/src/provider.dart:332:7)
  #1      Provider.of (package:provider/src/provider.dart:284:30)
  #2      _MeinAccountState.build (package:projectname/seitenleiste/meinacount.dart:362:27)
  #3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4704:27)
  #4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4587:15)
  </code></pre>
  <p>This is my widget UPDATEEE:</p>
  <pre><code>Widget _buildPasswordTF() {
      final user = Provider.of&lt;User&gt;(context);
      return StreamBuilder&lt;UserData&gt;(
        stream: DatbaseService(uid:user.uid).userData,
        builder: (context, snapshot) {
          return Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: &lt;Widget&gt;[
              Text(
                'Password',
  </code></pre>
  <p>Maybe anyone can help :</p>
  <p>Also here's my main dart UPDATEEE:</p>
  <pre><code>void main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await Firebase.initializeApp();
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context){
       return MultiProvider(
         providers: [
           //DatbaseService(create: (_) =&gt; User()), // add your providers like this.
         ],
         child: MaterialApp(
              debugShowCheckedModeBanner: false,
              title:'Appbar Scaffold',
              theme: ThemeData(
                scaffoldBackgroundColor: Colors.white,
                primaryColor: Colors.white,
  </code></pre>
  <p>If you need more informations please add a comment. Thanks again.</p>