title: Firebase.initializeApp() gives error: Null check operator used on a null value
body: <p>running this</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:firebase_core/firebase_core.dart';
  
  void main() async {
     await Firebase.initializeApp();
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        home: ThePage(),
      );
    }
  }
  
  class ThePage extends StatelessWidget {
    const ThePage({Key? key}) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(          
      );
    }
  }
  </code></pre>
  <p>is giving Null check operator used on a null value and pointing out the line <code>Firebase.initializeApp()</code>.
  I have tried <code>flutter clean</code> too.</p>
  <p>and the error in the stack trace</p>
  <pre><code>E/flutter (31894): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value
  E/flutter (31894): #0      MethodChannel.binaryMessenger
  package:flutter/…/services/platform_channel.dart:142
  E/flutter (31894): #1      MethodChannel._invokeMethod
  package:flutter/…/services/platform_channel.dart:148
  E/flutter (31894): #2      MethodChannel.invokeMethod
  package:flutter/…/services/platform_channel.dart:331
  E/flutter (31894): #3      MethodChannel.invokeListMethod
  package:flutter/…/services/platform_channel.dart:344
  E/flutter (31894): #4      MethodChannelFirebase._initializeCore
  package:firebase_core_platform_interface/…/method_channel/method_channel_firebase.dart:30
  E/flutter (31894): #5      MethodChannelFirebase.initializeApp
  package:firebase_core_platform_interface/…/method_channel/method_channel_firebase.dart:77
  E/flutter (31894): #6      Firebase.initializeApp
  package:firebase_core/src/firebase.dart:41
  E/flutter (31894): #7      main
  package:firebasetests/main.dart:5
  E/flutter (31894): #8      _runMainZoned.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (dart:ui/hooks.dart:142:25)
  E/flutter (31894): #9      _rootRun (dart:async/zone.dart:1354:13)
  E/flutter (31894): #10     _CustomZone.run (dart:async/zone.dart:1258:19)
  E/flutter (31894): #11     _runZoned (dart:async/zone.dart:1789:10)
  E/flutter (31894): #12     runZonedGuarded (dart:async/zone.dart:1777:12)
  E/flutter (31894): #13     _runMainZoned.&lt;anonymous closure&gt; (dart:ui/hooks.dart:138:5)
  E/flutter (31894): #14     _delayEntrypointInvocation.&lt;anonymous closure&gt; (dart:isolate-patch/isolate_patch.dart:283:19)
  E/flutter (31894): #15     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
  </code></pre>
  <p>This is the stack trace for the error, after removing <code>Firebase.initializeApp()</code> in the main it runs fine.</p>