title: Flutter Error: No named parameter with the name 'child'
body: <p><strong>I need help, when I run the code below in the android studio I get the following error:  <em>Error: No named parameter with the name 'child</em>'</strong></p>
  <p>I have also posted below the error message generated by android studio.</p>
  <p>I ran flutter upgrade, and now I am getting an error that says- [dart] The named parameter 'child' isn't defined. The project is newly created and the default code is untouched, but it still has the same Error:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import 'package:app_markeeting_and_promotion/models/home_model.dart';
  import 'package:cloud_firestore/cloud_firestore.dart';
  import 'package:device_apps/device_apps.dart';
  import 'package:firebase_admob/firebase_admob.dart';
  import 'package:flutter/material.dart';
  import 'package:provider/provider.dart';
  
  class DownlaodsApp extends StatefulWidget {
    @override
    _DownlaodsAppState createState() =&gt; _DownlaodsAppState();
  }
  
  class _DownlaodsAppState extends State&lt;DownlaodsApp&gt; {
    var stream = FirebaseFirestore.instance;
    static const MobileAdTargetingInfo targetingInfo = MobileAdTargetingInfo(keywords: ["Promotion","Kids","coins"]);
    RewardedVideoAd rewardedVideoAd = RewardedVideoAd.instance;
    int coins;
    String appName;
    @override
    void initState() {
      super.initState();
      //"ca-app-pub-xxxxxxxxxxxx/5xxxxxxx75"
      rewardedVideoAd.load(adUnitId: "ca-app-pub-xxxxxxxxxxxx/5xxxxxx5");
    }
    @override
    Widget build(BuildContext context) {
      final pro = Provider.of&lt;HomeModel&gt;(context);
      return Scaffold(
        appBar: AppBar(
          title: Text("Download Apps"),
        ),
        body: FutureBuilder(
          future: stream.collection('apps').get(),
          builder: (context,snapshot){
            if(snapshot.hasData){
              return ListView.builder(
                itemCount: snapshot.data.docs.length,
                itemBuilder: (ctx,i){
                  final List&lt;DocumentSnapshot&gt; documents = snapshot.data.docs;
                  if(documents[i]['coins'] &gt; 2){
                    return ListTile(
                      // subtitle: Text(documents[i]['userId']),
                      // ignore: deprecated_member_use
                      trailing: FlatButton(
                        color: Colors.green,
                        onPressed: ()async{
                          setState(() {
                            appName = documents[i]['link'];
                          });
                          await pro.downloadApp(documents[i]['link']);
                          showDialog(
                            context: context,
                            child: AlertDialog(
                              title: Text("Claim Your Coin"),
                              content: Text("its verify That you installed the app"),
                              actions: [
                                // ignore: deprecated_member_use
                                FlatButton(onPressed: ()async{
                                  print(appName);
                                  Navigator.pop(context);
                                 bool installed = await DeviceApps.isAppInstalled(appName);
                                 if(installed == true){
                                   print("installed=====================================");
                                   print(documents[i].id);
                                   await rewardedVideoAd.show();
                                   RewardedVideoAd.instance.listener =
                                       (RewardedVideoAdEvent event, {String rewardType, int rewardAmount}) {
                                     if (event == RewardedVideoAdEvent.rewarded) {
                                       setState(() {
                                         coins = rewardAmount;
                                       });
                                     }
                                   };
                                   print(coins);
                                   final pro = Provider.of&lt;HomeModel&gt;(context,listen: false);
                                  await pro.addDownload(documents[i].id, coins);
                                   print("app called");
                                 }else{
                                   print(documents[i].id);
                                   await rewardedVideoAd.show();
                                   RewardedVideoAd.instance.listener =
                                       (RewardedVideoAdEvent event, {String rewardType, int rewardAmount}) {
                                     if (event == RewardedVideoAdEvent.rewarded) {
                                       setState(() {
                                         coins = rewardAmount;
                                       });
                                     }
                                   };
                                   print("Not Installed");
                                   showDialog(
                                     context: context,
                                     child: AlertDialog(
                                       content: Text("You Must installed the app to claim your coins",style: TextStyle(color: Colors.red,),),
                                       title: Text("App Not Installed"),
                                       actions: [
                                         // ignore: deprecated_member_use
                                         FlatButton(onPressed: (){Navigator.pop(context);}, child: Text("Okay"))
                                       ],
                                     )
                                   );
                                 }
                                }, child: Text("Claim"))
                              ],
                            )
                          );
                        },
                        child: Text("Download"),),
                      title: Text("https://play.google.com/store/apps/details?id=${documents[i]['link']}"),
                    );
                  }else{
                    return Container();
                  }
                },
              );
            }else{
              return Center(child: CircularProgressIndicator(),);
            }
          },
        ),
      );
    }
  }</code></pre>
  </div>
  </div>
  </p>
  <p><strong>Below is the error code:</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Launching lib\main.dart on sdk gphone x86 64 in debug mode...
  Running Gradle task 'assembleDebug'...
  lib/views/downloads_apps.dart:92:36: Error: No named parameter with the name 'child'.
                                     child: AlertDialog(
                                     ^^^^^
  /C:/src/flutter/packages/flutter/lib/src/material/dialog.dart:1035:12: Context: Found this candidate, but the arguments don't match.
  Future&lt;T?&gt; showDialog&lt;T&gt;({
             ^^^^^^^^^^
  lib/views/downloads_apps.dart:53:27: Error: No named parameter with the name 'child'.
                            child: AlertDialog(
                            ^^^^^
  /C:/src/flutter/packages/flutter/lib/src/material/dialog.dart:1035:12: Context: Found this candidate, but the arguments don't match.
  Future&lt;T?&gt; showDialog&lt;T&gt;({
             ^^^^^^^^^^
  
  
  FAILURE: Build failed with an exception.
  
  * Where:
  Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991
  
  * What went wrong:
  Execution failed for task ':app:compileFlutterBuildDebug'.
  &gt; Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 18s
  Exception: Gradle task assembleDebug failed with exit code 1</code></pre>
  </div>
  </div>
  </p>