title: Flutter build web builds without sound null safety and runs on error
body: <p>Running <code>flutter build web</code> gives the following error:</p>
  <pre><code>flutter build web
  Changing current working directory to: /home/forest/projects/icell/i_cell_parking_manager
  
  Building without sound null safety
  For more information see https://dart.dev/null-safety/unsound-null-safety
  
  Target dart2js failed: Exception: ../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-1.0.1/lib/src/interop/utils/utils.dart:15:41:
  Error: The argument type 'Object? Function(Object)' can't be assigned to the parameter type 'Object? Function(Object?)?' because 'Object?' is nullable and 'Object' isn't.
   - 'Object' is from 'dart:core'.
    return core_interop.dartify(jsObject, (Object object) {
                                          ^
  ../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-1.0.1/lib/src/interop/utils/utils.dart:39:41:
  Error: The argument type 'dynamic Function(Object)' can't be assigned to the parameter type 'Object? Function(Object?)?' because 'Object?' is nullable and 'Object' isn't.
   - 'Object' is from 'dart:core'.
    return core_interop.jsify(dartObject, (Object object) {
                                          ^
  Error: Compilation failed.
  
  
  Compiling lib/main.dart for the Web...                              8.3s
  Exception: Failed to compile application for the Web.
  </code></pre>
  <p>Building for android works without any error (<code>flutter build apk</code>).</p>
  <p><code>flutter doctor</code></p>
  <pre><code>Flutter 2.0.3 • channel stable • https://github.com/flutter/flutter.git
  Framework • revision 4d7946a68d (10 days ago) • 2021-03-18 17:24:33 -0700
  Engine • revision 3459eb2436
  Tools • Dart 2.12.2
  
  Running flutter doctor...
  Doctor summary (to see all details, run flutter doctor -v):
  [✓] Flutter (Channel stable, 2.0.3, on Linux, locale en_US.UTF-8)
  [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
  [✓] Chrome - develop for the web
  [!] Android Studio (not installed)
  [✓] IntelliJ IDEA Ultimate Edition (version 2020.2)
  [✓] Connected device (2 available)
  ! Doctor found issues in 1 category.
  
  </code></pre>
  <p>(The Androd studio not installed is quite strange, as I am running the project from it, and I use a virtual device from AVD with no problem...)</p>
  <p>my <code>index.html</code> has the latest lib imported:</p>
  <pre><code>...
  
    &lt;script src=&quot;https://www.gstatic.com/firebasejs/7.8.0/firebase-auth.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://www.gstatic.com/firebasejs/7.20.0/firebase-app.js&quot;&gt;&lt;/script&gt;
  
  </code></pre>
  <p>relevant <code>pubspec.yaml</code> parts:</p>
  <pre><code>dependencies:
    flutter:
      sdk: flutter
    flutter_localizations:
      sdk: flutter
    flutter_spinkit: &quot;^4.1.2&quot;
    cloud_firestore: ^1.0.1
    cloud_functions: &quot;^1.0.2&quot;
    provider: ^5.0.0
    google_sign_in: ^5.0.0
    firebase_core: ^1.0.1
    firebase_messaging: ^9.0.0
    firebase_auth: ^1.0.1
  </code></pre>