Error not found dart html

Steps to Reproduce I'm unable to build my project for Android/iOS. The build fails with this error: Launching lib/main.dart on Android SDK built for x86 in debug mode... Compiler message: ../.....

pubspec.yaml

name: my_app
description: abc
version: 0.0.1+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  # App
  core:
    path: ../core
  shared:
    path: ../shared
  # data_access:
  #   path: ../data_access

  # Widgets
  flutter_platform_widgets:
  cached_network_image: any
  zoomable_image: any
  google_maps_flutter:

  # Misc
  provider: 
  flutter_bloc: 
  equatable: 
  email_validator: any
  package_info: any
  device_info: any

  cupertino_icons: ^0.1.2

dev_dependencies:
  flutter_test:
    sdk: flutter
flutter:
  assets:
    - assets/images/
    - assets/fonts/

flutter run —verbose

[   +3 ms] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop
[  +37 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +86 ms] Found plugin cloud_firestore at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.13.3/
[   +9 ms] Found plugin cloud_firestore_web at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-0.1.0+3/
[   +3 ms] Found plugin cloud_functions at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_functions-0.4.2+3/
[   +3 ms] Found plugin cloud_functions_web at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_functions_web-1.0.3/
[  +10 ms] Found plugin device_info at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-0.4.0+1/
[   +7 ms] Found plugin firebase_auth at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.15.5+3/
[   +3 ms] Found plugin firebase_auth_web at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-0.1.2/
[   +3 ms] Found plugin firebase_core at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.4/
[   +3 ms] Found plugin firebase_core_web at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-0.1.1+2/
[   +8 ms] Found plugin flutter_plugin_android_lifecycle at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.6/
[   +7 ms] Found plugin google_maps_flutter at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.24+1/
[  +11 ms] Found plugin package_info at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+3/
[   +2 ms] Found plugin path_provider at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-0.5.0+1/
[  +12 ms] Found plugin sqflite at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.5/
[  +42 ms] Found plugin cloud_firestore at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.13.3/
[   +2 ms] Found plugin cloud_firestore_web at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-0.1.0+3/
[   +1 ms] Found plugin cloud_functions at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_functions-0.4.2+3/
[   +1 ms] Found plugin cloud_functions_web at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_functions_web-1.0.3/
[   +5 ms] Found plugin device_info at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-0.4.0+1/
[   +2 ms] Found plugin firebase_auth at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.15.5+3/
[   +1 ms] Found plugin firebase_auth_web at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-0.1.2/
[        ] Found plugin firebase_core at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.4/
[   +1 ms] Found plugin firebase_core_web at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-0.1.1+2/
[  +12 ms] Found plugin flutter_plugin_android_lifecycle at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.6/
[   +2 ms] Found plugin google_maps_flutter at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.24+1/
[   +5 ms] Found plugin package_info at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+3/
[   +1 ms] Found plugin path_provider at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-0.5.0+1/
[   +5 ms] Found plugin sqflite at /Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.5/
[  +62 ms] Generating /Users/user/Documents/MyProjects/MyApp/app/client/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +29 ms] ro.hardware = ranchu
[  +32 ms] Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
[  +27 ms] Launching lib/main.dart on Android SDK built for x86 in debug mode...
[  +11 ms] /Users/user/flutter/bin/cache/dart-sdk/bin/dart /Users/user/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root
/Users/user/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names -Ddart.developer.causal_async_stacks=true --output-dill
/var/folders/3p/bhps_g7n5mz0j4xfn_bkbngh0000gn/T/flutter_tool.sgsWVj/app.dill --packages /Users/user/Documents/MyProjects/MyApp/app/client/.packages -Ddart.vm.profile=false
-Ddart.vm.product=false --bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts
--track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build/cache.dill
[  +19 ms] executing: /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell -x logcat -v time -t 1
[  +19 ms] Exit code 0 from: /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell -x logcat -v time -t 1
[  +14 ms] --------- beginning of main
           03-23 14:59:10.281 I/BackgroundDexOptService( 1661): Pinning optimized code {}
[  +15 ms] <- compile package:my_app/main.dart
[  +12 ms] executing: /Users/user/Library/Android/sdk/platform-tools/adb version
[  +24 ms] Android Debug Bridge version 1.0.41
           Version 29.0.5-5949299
           Installed as /Users/user/Library/Android/sdk/platform-tools/adb
[   +2 ms] executing: /Users/user/Library/Android/sdk/platform-tools/adb start-server
[  +11 ms] Building APK
[  +19 ms] Running Gradle task 'assembleDebug'...
[   +2 ms] gradle.properties already sets `android.enableR8`
[   +3 ms] Using gradle from /Users/user/Documents/MyProjects/MyApp/app/client/android/gradlew.
[        ] /Users/user/Documents/MyProjects/MyApp/app/client/android/gradlew mode: 33261 rwxr-xr-x.
[ +184 ms] executing: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[  +10 ms] Exit code 0 from: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[        ] {"CFBundleName":"Android
Studio","JVMOptions":{"ClassPath":"$APP_PACKAGE/Contents/lib/bootstrap.jar:$APP_PACKAGE/Contents/lib/extensions.jar:$APP_PACKAGE/Contents/lib/util.jar:$APP_PACKAGE/Contents/lib/jdom.ja
r:$APP_PACKAGE/Contents/lib/log4j.jar:$APP_PACKAGE/Contents/lib/trove4j.jar:$APP_PACKAGE/Contents/lib/jna.jar","JVMVersion":"1.8*,1.8+","WorkingDirectory":"$APP_PACKAGE/Contents/bin","M
ainClass":"com.intellij.idea.Main","Properties":{"idea.paths.selector":"AndroidStudio3.5","idea.executable":"studio","idea.platform.prefix":"AndroidStudio","idea.home.path":"$APP_PACKAGE/Contents
"}},"LSArchitecturePriority":["x86_64"],"CFBundleVersion":"AI-191.8026.42.35.5977832","CFBundleDevelopmentRegion":"English","CFBundleDocumentTypes":[{"CFBundleTypeName":"Android Studio Project
File","CFBundleTypeExtensions":["ipr"],"CFBundleTypeRole":"Editor","CFBundleTypeIconFile":"studio.icns"},{"CFBundleTypeName":"All
documents","CFBundleTypeExtensions":["*"],"CFBundleTypeOSTypes":["****"],"CFBundleTypeRole":"Editor","LSTypeIsPackage":false}],"NSSupportsAutomaticGraphicsSwitching":true,"CFBundlePackageType":"AP
PL","CFBundleIconFile":"studio.icns","NSHighResolutionCapable":true,"CFBundleShortVersionString":"3.5","CFBundleInfoDictionaryVersion":"6.0","CFBundleExecutable":"studio","LSRequiresNativeExecutio
n":"YES","CFBundleURLTypes":[{"CFBundleTypeRole":"Editor","CFBundleURLName":"Stacktrace","CFBundleURLSchemes":["idea"]}],"CFBundleIdentifier":"com.google.android.studio","LSApplicationCategoryType
":"public.app-category.developer-tools","CFBundleSignature":"????","LSMinimumSystemVersion":"10.8","CFBundleGetInfoString":"Android Studio 3.5, build AI-191.8026.42.35.5977832. Copyright JetBrains
s.r.o., (c) 2000-2019"}
[  +25 ms] executing: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[  +79 ms] Exit code 0 from: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[        ] openjdk version "1.8.0_202-release"
           OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
           OpenJDK 64-Bit Server VM (build 25.202-b49-5587405, mixed mode)
[   +2 ms] executing: [/Users/user/Documents/MyProjects/MyApp/app/client/android/] /Users/user/Documents/MyProjects/MyApp/app/client/android/gradlew -Pverbose=true
-Ptarget-platform=android-x86 -Ptarget=/Users/user/Documents/MyProjects/MyApp/app/client/lib/main.dart -Ptrack-widget-creation=true -Pfilesystem-scheme=org-dartlang-root assembleDebug
[ +780 ms] 
                    Compiler message:
[   +2 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/top_level.dart:1:8: Error: Not found: 'dart:html'
[        ] import 'dart:html';
[        ]        ^
[ +124 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/js.dart:8:1: Error: Not found: 'dart:js'
[        ] export 'dart:js' show allowInterop, allowInteropCaptureThis;
[        ] ^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/js_util.dart:8:1: Error: Not found: 'dart:js_util'
[        ] export 'dart:js_util';
[        ] ^
[+3045 ms] > Task :app:compileFlutterBuildDebug
[        ] [  +26 ms] executing: [/Users/user/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [  +42 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +1 ms] [        ] 3998549d529cb21488e5720a4c81cb20015e18e6
[        ] [        ] executing: [/Users/user/flutter/] git describe --match v*.*.* --first-parent --long --tags
[        ] [  +24 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] [        ] v1.16.1-26-g3998549d5
[        ] [  +10 ms] executing: [/Users/user/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[        ] [  +13 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] origin/beta
[        ] [        ] executing: [/Users/user/flutter/] git ls-remote --get-url origin
[        ] [  +14 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [  +85 ms] executing: [/Users/user/flutter/] git rev-parse --abbrev-ref HEAD
[        ] [  +19 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] beta
[        ] [  +30 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [   +9 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[  +38 ms] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [ +105 ms] Initializing file store
[        ] [   +5 ms] Done initializing file store
[        ] [ +873 ms] kernel_snapshot: Starting due to {}
[   +1 ms] [  +18 ms] /Users/user/flutter/bin/cache/dart-sdk/bin/dart /Users/user/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root
/Users/user/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --target=flutter -Ddart.developer.causal_async_stacks=true -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation
--no-link-platform --packages /Users/user/Documents/MyProjects/MyApp/app/client/.packages --output-dill
/Users/user/Documents/MyProjects/MyApp/app/client/.dart_tool/flutter_build/6b59d9bceb88d1484aeb7856588a404c/app.dill --depfile
/Users/user/Documents/MyProjects/MyApp/app/client/.dart_tool/flutter_build/6b59d9bceb88d1484aeb7856588a404c/kernel_snapshot.d package:my_app/main.dart
[   +3 ms] [  +16 ms] Invalid depfile: /Users/user/Documents/MyProjects/MyApp/app/client/.dart_tool/flutter_build/6b59d9bceb88d1484aeb7856588a404c/kernel_snapshot.d
[        ] [   +2 ms] Invalid depfile: /Users/user/Documents/MyProjects/MyApp/app/client/.dart_tool/flutter_build/6b59d9bceb88d1484aeb7856588a404c/kernel_snapshot.d
[ +822 ms] [+1168 ms] 
[        ]            Compiler message:
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/top_level.dart:1:8: Error: Not found: 'dart:html'
[        ] [        ] import 'dart:html';
[        ] [        ]        ^
[  +97 ms] [  +60 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/js.dart:8:1: Error: Not found: 'dart:js'
[        ] [        ] export 'dart:js' show allowInterop, allowInteropCaptureThis;
[        ] [        ] ^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/js_util.dart:8:1: Error: Not found: 'dart:js_util'
[        ] [        ] export 'dart:js_util';
[        ] [        ] ^
[ +569 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:306:25: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
[        ]  - 'Auth' is from 'package:firebase/src/auth.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       var nextWrapper = allowInterop((firebase_interop.UserJsImpl user) {
[        ]                         ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:310:26: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
[        ]  - 'Auth' is from 'package:firebase/src/auth.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       var errorWrapper = allowInterop((e) => _changeController.addError(e));
[        ]                          ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:340:25: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
[        ]  - 'Auth' is from 'package:firebase/src/auth.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       var nextWrapper = allowInterop((firebase_interop.UserJsImpl user) {
[        ]                         ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:345:11: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
[        ]  - 'Auth' is from 'package:firebase/src/auth.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]           allowInterop((e) => _idTokenChangedController.addError(e));
[  +45 ms]           ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:164:9: Error: The method 'allowInterop' isn't defined for the class
'DatabaseReference<T>'.
[        ]  - 'DatabaseReference' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]         allowInterop((update) => jsify(transactionUpdate(dartify(update))));
[        ]         ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:166:26: Error: The method 'allowInterop' isn't defined for the class
'DatabaseReference<T>'.
[        ]  - 'DatabaseReference' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]     var onCompleteWrap = allowInterop(
[        ]                          ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:301:24: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
[        ]  - 'Query' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]     var callbackWrap = allowInterop((database_interop.DataSnapshotJsImpl data,
[        ]                        ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:325:30: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
[        ]  - 'Query' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]     jsObject.once(eventType, allowInterop(
[        ]                              ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:402:22: Error: The method 'allowInterop' isn't defined for the class 'DataSnapshot'.
[        ]  - 'DataSnapshot' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]     var actionWrap = allowInterop((d) => action(DataSnapshot.getInstance(d)));
[        ]                      ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:72:27: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
[        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       final nextWrapper = allowInterop((payload) {
[        ]                           ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:75:28: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
[        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       final errorWrapper = allowInterop((e) {
[        ]                            ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:87:27: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
[        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       final nextWrapper = allowInterop((payload) {
[        ]                           ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:97:27: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
[        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       final nextWrapper = allowInterop((_) => null);
[        ]                           ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:98:28: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
[        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       final errorWrapper = allowInterop((e) {
[        ]                            ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart:317:11: Error: The method 'allowInterop' isn't defined for the class 'UploadTask'.
[        ]  - 'UploadTask' is from 'package:firebase/src/storage.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]           allowInterop((storage_interop.UploadTaskSnapshotJsImpl data) {
[        ]           ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart:321:26: Error: The method 'allowInterop' isn't defined for the class 'UploadTask'.
[        ]  - 'UploadTask' is from 'package:firebase/src/storage.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       var errorWrapper = allowInterop((e) => _changeController.addError(e));
[        ]                          ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart:322:26: Error: The method 'allowInterop' isn't defined for the class 'UploadTask'.
[        ]  - 'UploadTask' is from 'package:firebase/src/storage.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]       var onCompletion = allowInterop(() => _changeController.close());
[        ]                          ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/top_level.dart:194:7: Error: Method not found: 'hasProperty'.
[        ]   if (js.hasProperty(error, 'message')) {
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/top_level.dart:195:19: Error: Method not found: 'getProperty'.
[        ]     var message = js.getProperty(error, 'message');
[        ]                   ^^^^^^^^^^^
[   +5 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:29:7: Error: Method not found: 'hasProperty'.
[        ]   if (util.hasProperty(jsObject, 'firestore') &&
[  +56 ms]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:30:7: Error: Method not found: 'hasProperty'.
[        ]       util.hasProperty(jsObject, 'id') &&
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:31:7: Error: Method not found: 'hasProperty'.
[        ]       util.hasProperty(jsObject, 'parent')) {
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:37:7: Error: Method not found: 'hasProperty'.
[        ]   if (util.hasProperty(jsObject, 'latitude') &&
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:38:7: Error: Method not found: 'hasProperty'.
[        ]       util.hasProperty(jsObject, 'longitude') &&
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:44:15: Error: Method not found: 'getProperty'.
[        ]   var proto = util.getProperty(jsObject, '__proto__');
[        ]               ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:46:7: Error: Method not found: 'hasProperty'.
[   +3 ms]   if (util.hasProperty(proto, 'toDate') &&
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:47:7: Error: Method not found: 'hasProperty'.
[        ]       util.hasProperty(proto, 'toMillis')) {
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:52:7: Error: Method not found: 'hasProperty'.
[        ]   if (util.hasProperty(proto, 'isEqual') &&
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:53:7: Error: Method not found: 'hasProperty'.
[  +43 ms]       util.hasProperty(proto, 'toBase64')) {
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:67:24: Error: Method not found: 'getProperty'.
[        ]     map[key] = dartify(util.getProperty(jsObject, key));
[        ]                        ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:91:17: Error: Method not found: 'newObject'.
[        ]     var jsMap = util.newObject();
[        ]                 ^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:93:7: Error: Method not found: 'setProperty'.
[        ]       util.setProperty(jsMap, key, jsify(value));
[        ]       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:116:12: Error: Method not found: 'allowInterop'.
[        ]     return allowInterop(dartObject);
[        ]            ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:124:5: Error: Method not found: 'callMethod'.
[        ]     util.callMethod(jsObject, method, args);
[        ]     ^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:139:19: Error: Method not found: 'promiseToFuture'.
[        ]     value = await util.promiseToFuture(thenable);
[        ]                   ^^^^^^^^^^^^^^^
[  +64 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:141:9: Error: Method not found: 'hasProperty'.
[        ]     if (util.hasProperty(e, 'code')) {
[        ]         ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:152:27: Error: Method not found: 'allowInterop'.
[        ]   return PromiseJsImpl<S>(allowInterop((
[        ]                           ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:165:5: Error: Method not found: 'allowInterop'.
[        ]     allowInterop(c.completeError);
[        ]     ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:173:22: Error: Method not found: 'getProperty'.
[   +8 ms]   String get code => util.getProperty(_source, 'code');
[        ]                      ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:176:25: Error: Method not found: 'getProperty'.
[        ]   String get message => util.getProperty(_source, 'message');
[        ]                         ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:179:22: Error: Method not found: 'getProperty'.
[        ]   String get name => util.getProperty(_source, 'name');
[        ]                      ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:182:32: Error: Method not found: 'getProperty'.
[        ]   Object get serverResponse => util.getProperty(_source, 'serverResponse');
[        ]                                ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:185:23: Error: Method not found: 'getProperty'.
[        ]   String get stack => util.getProperty(_source, 'stack');
[   +2 ms]                       ^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:105:30: Error: The method 'allowInterop' isn't defined for the class 'Firestore'.
[        ]  - 'Firestore' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]     var updateFunctionWrap = allowInterop((transaction) =>
[        ]                              ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:306:11: Error: The method 'allowInterop' isn't defined for the class 'DocumentReference'.
[   +1 ms]  - 'DocumentReference' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]           allowInterop((firestore_interop.DocumentSnapshotJsImpl snapshot) {
[        ]           ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:310:26: Error: The method 'allowInterop' isn't defined for the class 'DocumentReference'.
[   +8 ms]  - 'DocumentReference' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[  +69 ms]       var errorWrapper = allowInterop((e) => controller.addError(e));
[        ]                          ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:445:9: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
[        ]  - 'Query' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]         allowInterop((firestore_interop.QuerySnapshotJsImpl snapshot) {
[        ]         ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:449:24: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
[  +95 ms]  - 'Query' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ]     var errorWrapper = allowInterop((e) => controller.addError(e));
[        ]                        ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:775:9: Error: The method 'allowInterop' isn't defined for the class 'QuerySnapshot'.
[        ]  - 'QuerySnapshot' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[   +3 ms]         allowInterop((s) => callback(DocumentSnapshot.getInstance(s)));
[        ]         ^^^^^^^^^^^^
[        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/interop/js_interop.dart:17:7: Error: Method not found: 'hasProperty'.
[        ]   if (util.hasProperty(jsObject, 'toDateString')) {
[        ]       ^^^^^^^^^^^
[+3378 ms] [+4457 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:306:25: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
[        ] [        ]  - 'Auth' is from 'package:firebase/src/auth.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       var nextWrapper = allowInterop((firebase_interop.UserJsImpl user) {
[        ] [        ]                         ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:310:26: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
[        ] [        ]  - 'Auth' is from 'package:firebase/src/auth.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       var errorWrapper = allowInterop((e) => _changeController.addError(e));
[        ] [        ]                          ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:340:25: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
[        ] [        ]  - 'Auth' is from 'package:firebase/src/auth.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       var nextWrapper = allowInterop((firebase_interop.UserJsImpl user) {
[        ] [        ]                         ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:345:11: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
[        ] [        ]  - 'Auth' is from 'package:firebase/src/auth.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
[  +62 ms] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]           allowInterop((e) => _idTokenChangedController.addError(e));
[        ] [        ]           ^^^^^^^^^^^^
[        ] [   +7 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:164:9: Error: The method 'allowInterop' isn't defined for the class
'DatabaseReference<T>'.
[        ] [        ]  - 'DatabaseReference' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[   +1 ms] [        ]         allowInterop((update) => jsify(transactionUpdate(dartify(update))));
[        ] [        ]         ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:166:26: Error: The method 'allowInterop' isn't defined for the class
'DatabaseReference<T>'.
[        ] [        ]  - 'DatabaseReference' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[   +1 ms] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]     var onCompleteWrap = allowInterop(
[        ] [        ]                          ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:301:24: Error: The method 'allowInterop' isn't defined for the class
'Query<T>'.
[  +59 ms] [        ]  - 'Query' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]     var callbackWrap = allowInterop((database_interop.DataSnapshotJsImpl data,
[        ] [        ]                        ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:325:30: Error: The method 'allowInterop' isn't defined for the class
'Query<T>'.
[        ] [        ]  - 'Query' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]     jsObject.once(eventType, allowInterop(
[        ] [        ]                              ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:402:22: Error: The method 'allowInterop' isn't defined for the class
'DataSnapshot'.
[        ] [        ]  - 'DataSnapshot' is from 'package:firebase/src/database.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
[  +61 ms] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]     var actionWrap = allowInterop((d) => action(DataSnapshot.getInstance(d)));
[        ] [        ]                      ^^^^^^^^^^^^
[        ] [   +2 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:72:27: Error: The method 'allowInterop' isn't defined for the class
'Messaging'.
[        ] [        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       final nextWrapper = allowInterop((payload) {
[        ] [        ]                           ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:75:28: Error: The method 'allowInterop' isn't defined for the class
'Messaging'.
[        ] [        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       final errorWrapper = allowInterop((e) {
[        ] [        ]                            ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:87:27: Error: The method 'allowInterop' isn't defined for the class
'Messaging'.
[        ] [        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       final nextWrapper = allowInterop((payload) {
[        ] [        ]                           ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:97:27: Error: The method 'allowInterop' isn't defined for the class
'Messaging'.
[        ] [        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       final nextWrapper = allowInterop((_) => null);
[        ] [        ]                           ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:98:28: Error: The method 'allowInterop' isn't defined for the class
'Messaging'.
[        ] [        ]  - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       final errorWrapper = allowInterop((e) {
[        ] [        ]                            ^^^^^^^^^^^^
[        ] [   +9 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart:317:11: Error: The method 'allowInterop' isn't defined for the class
'UploadTask'.
[        ] [        ]  - 'UploadTask' is from 'package:firebase/src/storage.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]           allowInterop((storage_interop.UploadTaskSnapshotJsImpl data) {
[        ] [        ]           ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart:321:26: Error: The method 'allowInterop' isn't defined for the class
'UploadTask'.
[        ] [        ]  - 'UploadTask' is from 'package:firebase/src/storage.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[  +50 ms] [        ]       var errorWrapper = allowInterop((e) => _changeController.addError(e));
[        ] [        ]                          ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart:322:26: Error: The method 'allowInterop' isn't defined for the class
'UploadTask'.
[        ] [        ]  - 'UploadTask' is from 'package:firebase/src/storage.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       var onCompletion = allowInterop(() => _changeController.close());
[        ] [        ]                          ^^^^^^^^^^^^
[  +58 ms] [   +4 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/top_level.dart:194:7: Error: Method not found: 'hasProperty'.
[        ] [        ]   if (js.hasProperty(error, 'message')) {
[        ] [        ]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/top_level.dart:195:19: Error: Method not found: 'getProperty'.
[        ] [   +1 ms]     var message = js.getProperty(error, 'message');
[        ] [        ]                   ^^^^^^^^^^^
[        ] [  +29 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:29:7: Error: Method not found: 'hasProperty'.
[        ] [        ]   if (util.hasProperty(jsObject, 'firestore') &&
[        ] [        ]       ^^^^^^^^^^^
[  +87 ms] [   +2 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:30:7: Error: Method not found: 'hasProperty'.
[        ] [        ]       util.hasProperty(jsObject, 'id') &&
[        ] [        ]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:31:7: Error: Method not found: 'hasProperty'.
[        ] [        ]       util.hasProperty(jsObject, 'parent')) {
[        ] [        ]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:37:7: Error: Method not found: 'hasProperty'.
[        ] [        ]   if (util.hasProperty(jsObject, 'latitude') &&
[        ] [        ]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:38:7: Error: Method not found: 'hasProperty'.
[        ] [        ]       util.hasProperty(jsObject, 'longitude') &&
[        ] [        ]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:44:15: Error: Method not found: 'getProperty'.
[        ] [        ]   var proto = util.getProperty(jsObject, '__proto__');
[        ] [        ]               ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:46:7: Error: Method not found: 'hasProperty'.
[        ] [        ]   if (util.hasProperty(proto, 'toDate') &&
[        ] [        ]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:47:7: Error: Method not found: 'hasProperty'.
[        ] [        ]       util.hasProperty(proto, 'toMillis')) {
[        ] [        ]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:52:7: Error: Method not found: 'hasProperty'.
[        ] [        ]   if (util.hasProperty(proto, 'isEqual') &&
[        ] [        ]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:53:7: Error: Method not found: 'hasProperty'.
[        ] [        ]       util.hasProperty(proto, 'toBase64')) {
[        ] [        ]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:67:24: Error: Method not found: 'getProperty'.
[        ] [        ]     map[key] = dartify(util.getProperty(jsObject, key));
[        ] [        ]                        ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:91:17: Error: Method not found: 'newObject'.
[        ] [        ]     var jsMap = util.newObject();
[        ] [        ]                 ^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:93:7: Error: Method not found: 'setProperty'.
[        ] [        ]       util.setProperty(jsMap, key, jsify(value));
[   +1 ms] [   +1 ms]       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:116:12: Error: Method not found: 'allowInterop'.
[        ] [        ]     return allowInterop(dartObject);
[        ] [        ]            ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:124:5: Error: Method not found: 'callMethod'.
[        ] [        ]     util.callMethod(jsObject, method, args);
[        ] [        ]     ^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:139:19: Error: Method not found: 'promiseToFuture'.
[        ] [        ]     value = await util.promiseToFuture(thenable);
[        ] [        ]                   ^^^^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:141:9: Error: Method not found: 'hasProperty'.
[        ] [        ]     if (util.hasProperty(e, 'code')) {
[        ] [   +1 ms]         ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:152:27: Error: Method not found: 'allowInterop'.
[        ] [        ]   return PromiseJsImpl<S>(allowInterop((
[        ] [        ]                           ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:165:5: Error: Method not found: 'allowInterop'.
[        ] [        ]     allowInterop(c.completeError);
[        ] [        ]     ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:173:22: Error: Method not found: 'getProperty'.
[        ] [        ]   String get code => util.getProperty(_source, 'code');
[        ] [        ]                      ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:176:25: Error: Method not found: 'getProperty'.
[        ] [        ]   String get message => util.getProperty(_source, 'message');
[        ] [        ]                         ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:179:22: Error: Method not found: 'getProperty'.
[        ] [        ]   String get name => util.getProperty(_source, 'name');
[        ] [        ]                      ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:182:32: Error: Method not found: 'getProperty'.
[        ] [        ]   Object get serverResponse => util.getProperty(_source, 'serverResponse');
[        ] [        ]                                ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:185:23: Error: Method not found: 'getProperty'.
[        ] [        ]   String get stack => util.getProperty(_source, 'stack');
[        ] [        ]                       ^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:105:30: Error: The method 'allowInterop' isn't defined for the class
'Firestore'.
[        ] [        ]  - 'Firestore' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]     var updateFunctionWrap = allowInterop((transaction) =>
[        ] [        ]                              ^^^^^^^^^^^^
[        ] [   +3 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:306:11: Error: The method 'allowInterop' isn't defined for the class
'DocumentReference'.
[  +47 ms] [        ]  - 'DocumentReference' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[   +1 ms] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]           allowInterop((firestore_interop.DocumentSnapshotJsImpl snapshot) {
[        ] [        ]           ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:310:26: Error: The method 'allowInterop' isn't defined for the class
'DocumentReference'.
[        ] [        ]  - 'DocumentReference' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]       var errorWrapper = allowInterop((e) => controller.addError(e));
[        ] [        ]                          ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:445:9: Error: The method 'allowInterop' isn't defined for the class
'Query<T>'.
[  +45 ms] [        ]  - 'Query' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]         allowInterop((firestore_interop.QuerySnapshotJsImpl snapshot) {
[        ] [        ]         ^^^^^^^^^^^^
[        ] [        ] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:449:24: Error: The method 'allowInterop' isn't defined for the class
'Query<T>'.
[        ] [        ]  - 'Query' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[        ] [        ]     var errorWrapper = allowInterop((e) => controller.addError(e));
[        ] [        ]                        ^^^^^^^^^^^^
[   +1 ms] [   +5 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:775:9: Error: The method 'allowInterop' isn't defined for the class
'QuerySnapshot'.
[        ] [        ]  - 'QuerySnapshot' is from 'package:firebase/src/firestore.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
[        ] [        ] Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
[  +47 ms] [        ]         allowInterop((s) => callback(DocumentSnapshot.getInstance(s)));
[        ] [        ]         ^^^^^^^^^^^^
[        ] [  +13 ms] ../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/interop/js_interop.dart:17:7: Error: Method not found: 'hasProperty'.
[        ] [        ]   if (util.hasProperty(jsObject, 'toDateString')) {
[        ] [        ]       ^^^^^^^^^^^
[+2023 ms] [+2408 ms] Unhandled exception:
[        ]            FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
[        ]            #0      StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)
[        ]            #1      asFileUri (package:vm/kernel_front_end.dart:567:37)
[        ]            #2      writeDepfile (package:vm/kernel_front_end.dart:760:21)
[        ]            <asynchronous suspension>
[        ]            #3      FrontendCompiler.compile (package:frontend_server/frontend_server.dart:535:15)
[        ]            <asynchronous suspension>
[        ]            #4      _FlutterFrontendCompiler.compile (package:flutter_frontend_server/server.dart:40:22)
[        ]            #5      starter (package:flutter_frontend_server/server.dart:177:27)
[        ]            #6      main (file:///b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:8:30)
[        ]            #7      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
[        ]            #8      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
[  +95 ms] [ +162 ms] Persisting file store
[        ] [   +5 ms] Done persisting file store
[        ] [        ] Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
[  +98 ms] [   +9 ms] "flutter assemble" took 9,494ms.
[        ] build failed.
[        ] #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
[        ] #1      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:193:7)
[        ] #2      _rootRunUnary (dart:async/zone.dart:1141:38)
[        ] #3      _CustomZone.runUnary (dart:async/zone.dart:1034:19)
[        ] #4      _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
[        ] #5      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:681:45)
[        ] #6      Future._propagateToListeners (dart:async/future_impl.dart:710:32)
[        ] #7      Future._completeWithValue (dart:async/future_impl.dart:525:5)
[        ] #8      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:34:15)
[        ] #9      _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
[        ] #10     BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1141:38)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1034:19)
[        ] #13     _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
[        ] #14     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:681:45)
[        ] #15     Future._propagateToListeners (dart:async/future_impl.dart:710:32)
[        ] #16     Future._completeWithValue (dart:async/future_impl.dart:525:5)
[        ] #17     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:34:15)
[        ] #18     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
[        ] #19     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart)
[        ] #20     _rootRunUnary (dart:async/zone.dart:1141:38)
[        ] #21     _CustomZone.runUnary (dart:async/zone.dart:1034:19)
[  +38 ms] #22     _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
[        ] #23     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:681:45)
[        ] #24     Future._propagateToListeners (dart:async/future_impl.dart:710:32)
[        ] #25     Future._completeWithValue (dart:async/future_impl.dart:525:5)
[        ] #26     Future.wait.<anonymous closure> (dart:async/future.dart:401:22)
[        ] #27     _rootRunUnary (dart:async/zone.dart:1141:38)
[        ] #28     _CustomZone.runUnary (dart:async/zone.dart:1034:19)
[        ] #29     _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
[        ] #30     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:681:45)
[        ] #31     Future._propagateToListeners (dart:async/future_impl.dart:710:32)
[  +32 ms] #32     Future._completeWithValue (dart:async/future_impl.dart:525:5)
[        ] #33     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:34:15)
[        ] #34     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
[        ] #35     _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart)
[        ] #36     _asyncErrorWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:82:45)
[        ] #37     _rootRunBinary (dart:async/zone.dart:1153:38)
[        ] #38     _CustomZone.runBinary (dart:async/zone.dart:1042:19)
[        ] #39     _FutureListener.handleError (dart:async/future_impl.dart:154:20)

Today I wanted to build a simple web crawler in Dart with unit tests. The road turned out to be bumpier than I had expected. I’ll write down what I learned.

Making a get request

A Google search leads to this Dart cookbook, and shows that it’s as simple as adding the http package, then:

import 'package:http/http.dart' as http;
...
http.get(Uri.parse('https://...'))

And indeed, it worked fine.

Parsing the HTML

Now it gets slightly trickier. It’s actually really simple, but for some reason, I started in the wrong direction: https://api.dart.dev/stable/2.15.1/dart-html/DomParser/parseFromString.html. The doc is surprisingly sparse. They don’t even document what type should be. On MDN, I found some more documentation (see here), so I tried:

import 'dart:html';
...
DomParser().parseFromString(response.body, 'text/html');

But it failed with this error:

: Error: Not found: 'dart:html'
lib/my_crawler.dart:1
import 'dart:html';
       ^
: Error: Method not found: 'DomParser'.
lib/my_crawler.dart:20
    DomParser().parseFromString(doc.body, 'text/html');
    ^^^^^^^^^

The reason is because dart:html is in fact only available in the Browser, ie only if you’re making Dart Web apps.

To parse HTML on other platforms, one should use the html package.

import 'package:html/parser.dart' show parse;
import 'package:http/http.dart' as http;
...
final response = await http.get(uri);
final document = parse(response.body);
final links = document.querySelectorAll('a');
final uris = links.map((link) => Uri.parse(link.attributes['href'] as String));

Perfect! Now let’s write unit tests so we can start iterating faster.

Unit tests

Preparing the test data

Unit tests will help me iterate faster, because I won’t have to download the same HTML page every time I run the crawler. Instead, I’ll download the page once, and the test will read that file locally. Here’s how to download the page:

% curl https://www.videocardbenchmark.net/common_gpus.html > common_gpus.html

Note: when the page isn’t found, the > filename trick does not work. It simply creates an empty file instead of the 404 error page. To capture the 404 error page, I had to use the --output filename parameter. Finally, for URL’s that are slightly more complicated (something?a=123&b=456), you have to pass the URI within quotes :

% curl --output GeForce_RTX_3080_Ti.html "https://www.videocardbenchmark.net/gpu.php?gpu=GeForce+RTX+3080+Ti&id=4409"

Mocking http

Change the function signature to pass mocks

Next we need to use a mock http Client. So instead of the static http.get, we should pass a specific client to the crawler. So I changed the crawl function’s signature from:

static Future<Map<String, Benchmark>> crawlPage(Uri uri)

to:

static Future<Map<String, Benchmark>> crawlPage(Uri uri, Client client)

In my application, I have to pass an actual client:

MyCrawler.crawlPage(Uri.parse('https://...'), Client());

So that in my test, I can pass a mock:

import 'dart:io';

import 'package:gpu_benchmarks/videocardbenchmark_crawler.dart';
import 'package:http/http.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';

main() {
  test('Crawls a page', () async {
    const url = 'https://www.videocardbenchmark.net/common_gpus.html';
    final client = MockClient();
    final uri = Uri.parse(url);
    ...
    final r = await VideoCardBenchmarkCrawler.crawlPage(uri, client);
    expect(r.length, equals(100));
  });
}

class MockClient extends Mock implements Client {}

Mocking an http response

Finally, I want to make my MockClient return the file I have previously downloaded. According to the Mockito doc, it’s as simpe as:

final mockResponse = Response(File('./test/common_gpus.html').readAsStringSync(), 200);
when(client.get(any)).thenReturn(Future.value(mockResponse));

But I get this error:

It turns out this is a new type of error that appeared with the introduction of null safety in Dart. Since any matches null, and Client.get expects a non-null Uri, it fails to compile.

I tried to get around the error by not using any, and matching with the exact value instead:

when(client.get(uri)).thenReturn(...);

It compiles but at runtime, it throws:

type ‘Null’ is not a subtype of type ‘Future<Response>’ at MockClient.get

It seems like the mock client.get returns null, which the runtime won’t accept since it expects a Future<Response>. So at this point it’s better to follow the doc than try the old ways randomly.

Mockito now has a full doc about how to handle null safety. See here. Interestingly, it uses an example about mocking a client response as well:

Matching with `any` won’t be as convenient to use as before.

The doc explains that the new way to mock my Client is to add an annotation that tells Mockito to generate the Mock using the build_runner package.

import 'dart:io';

import 'package:http/http.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';

@GenerateMocks([Client])
main() {
  test('Crawls a page', () async {
    ...

The doc shows the command to run build_runner once everything is set up, but it shows the outdated command pub run build_runner build. The new one is:

% dart run build_runner build

Running build_runner generates the MockClient in crawler_test.mocks.dart and I can now import that class in my test. The generated function actually accepts a nullable (Uri?) instead, which means you can use any without a problem.

Finally, I had one last runtime error:

Invalid argument(s): `thenReturn` should not be used to return a Future. Instead, use `thenAnswer((_) => future)`.

That’s because for futures, we’re supposed to use thenAnswer.  Then our code becomes:

final mockResponse = Response(File('./test/common_gpus.html').readAsStringSync(), 200);
when(client.get(any)).thenAnswer((_) => Future.value(mockResponse));

And now the test finally runs successfully.

Paulo Ricardo Asks: Coordinates extracted from PDF are not exact
I’m working on rendering a georeferenced pdf within a map, I was able to retrieve the geolocation information from the pdf, but the coordinates I receive are not correct, they are a few meters apart from the places they really should be.

Opening the same PDF in Avenza Maps, it indicates this list of coordinates, and these are correct:

Code:

[-26.413082, -51.561534, -26.435838, -51.561643, -26.435909, -51.543773,-26.413152, -51.543667]

In the format I’m doing (reading the PDF as a String and doing a RegEx) I get these values:

Code:

[-26.43302 -51.56133 -26.41418 -51.56124 -26.41424 -51.54409 -26.43309 -51.54418]
[-26.45579 -51.59842 -26.41777 -51.59822 -26.41811 -51.51036 -26.45613 -51.51053]

But unfortunately none of the two reflect in the correct place (as in avenza). That said, I opened the PDF in Notepad and found other values (more related to conversion and information), and I believe that maybe there is some way to convert the coordinates that I got through this other information, to the correct coordinates.

Follow the informations:

Code:

/VP [
    <<
        /Type
        /Viewport
        /BBox [14.1732 147.400915455 822.0456 1133.350548016]
        /Name (TSBII)
        /Measure <<
            /Type
            /Measure
            /Subtype
            /GEO
            /Bounds [0 0 0 1 1 1 1 0 0 0]
            /GPTS [ -26.43302 -51.56133 -26.41418 -51.56124
                    -26.41424 -51.54409 -26.43309 -51.54418]
            /LPTS [ 0 0 0 1 1 1 1 0]
            /GCS<<
                /Type
                /PROJCS
                /WKT (
PROJCS["SIRGAS_2000_UTM_Zone_22S",
    GEOGCS["GCS_SIRGAS_2000",
        DATUM["D_SIRGAS_2000",SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]
    ],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["False_Easting",500000.0],
    PARAMETER["False_Northing",10000000.0],
    PARAMETER["Central_Meridian",-51.0],
    PARAMETER["Scale_Factor",0.9996],
    PARAMETER["Latitude_Of_Origin",0.0],
    UNIT["Meter",1.0]
]
)
            >>
        >>
    >>
    <<
        /Type
        /Viewport
        /BBox [14.1732 14.1732 239.961243463 122.688692878]
        /Name (Referencia_Mapa)
        /Measure <<
            /Type
            /Measure
            /Subtype
            /GEO
            /Bounds [0 0 0 1 1 1 1 0 0 0]
            /GPTS [ -26.45579 -51.59842 -26.41777 -51.59822
                    -26.41811 -51.51036 -26.45613 -51.51053]
            /LPTS [ 0 0 0 1 1 1 1 0]
            /GCS<<
                /Type
                /PROJCS
                /WKT (
PROJCS["SIRGAS_2000_UTM_Zone_22S",
    GEOGCS["GCS_SIRGAS_2000",
        DATUM["D_SIRGAS_2000",SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]
    ],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["False_Easting",500000.0],
    PARAMETER["False_Northing",10000000.0],
    PARAMETER["Central_Meridian",-51.0],
    PARAMETER["Scale_Factor",0.9996],
    PARAMETER["Latitude_Of_Origin",0.0],
    UNIT["Meter",1.0]])
            >>
        >>
    >>
]
>>

I needed someone to tell me some way to get the correct coordinates, I hope this information helps to find

I’ve been at this for weeks, and I’ve tried to study as much as possible, I realized that the map in the application I work in is in wsg84, but I still don’t understand why the coordinates that I extract from the pdf are not aligned in the correct place, and taking it from avenza, they stay, someone help me, please!

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.

Понравилась статья? Поделить с друзьями:
  • Error non numeric character in statement label at 1
  • Error node with name rabbit already running on
  • Error noauth authentication required redis
  • Error no valid servers configured
  • Error no valid recipients