I’m working on a Flutter web project, and I’ve encountered a compilation issue when trying to build the web version of my app. The error messages are related to the web package and JSObject superclass issues. Here are the details of the errors:
../../.pub-cache/hosted/pub.dev/web-0.3.0/lib/src/dom/webxr_hit_test.dart:55:34:
Error: The type 'JSObject' can't be used as supertype.
class XRHitTestSource implements JSObject {}
^
...
../../.pub-cache/hosted/pub.dev/web-0.3.0/lib/src/helpers/events/providers.dart:615:9:
Error: The method 'typeofEquals' isn't defined for the class 'EventTarget'.
if (e.typeofEquals('undefined')) {
^^^^^^^^^^^^
...
Here is my pubspec.yaml:
name: v3_mvp
description: “A new Flutter project.”
publish_to: ‘none’
version: 1.0.0+1
environment:
sdk: ‘>=3.2.3 <4.0.0’
dependencies:
http: ^1.1.1
go_router: ^14.1.3
url_launcher: ^6.2.6
kpostal: ^0.5.1
equatable: ^2.0.5
syncfusion_flutter_charts: ^25.1.40
carousel_slider: ^4.2.1
permission_handler: ^11.3.1
image_picker_web: ^3.1.1
image_picker: ^1.0.7
flutter_form_builder: ^9.2.1
flutter_svg: ^2.0.7
provider: ^6.1.2
dio: ^5.4.2+1
firebase_storage: ^11.6.9
firebase_core: ^2.26.0
firebase_auth: ^4.17.8
cloud_firestore: ^4.15.8
fl_chart: ^0.67.0
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^1.0.2
dartz: ^0.10.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
I have tried the following steps to resolve the issue, but none of them worked:
Running flutter clean
Running flutter pub get
Updating all dependencies to their latest versions
Any help or suggestions to fix this issue would be greatly appreciated!
박재성 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.