Error (Xcode): ../../.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0/lib/src/adapter.dart:3:8: Error: Dart library 'dart:js_interop' is not available on this platform. #2372
Labels
i: wontfix
This will not be worked on
Package
dio
Version
5.8.0+1
Operating-System
iOS
Adapter
Default Dio
Output of
flutter doctor -v
No response
Dart Version
3.6.1
Steps to Reproduce
Please why are my getting this error [see the error below] when I did not explicitly called 'dio_web_adapter' package in my pubspec.yml? I am only using package dio (upgrade from dio: ^5.3.2 to dio: ^5.8.0+1, but issue still persists)
I am trying to build for iphone is yet I get that the error above:
I have tried:
rm -rf .dart_tool
rm -rf .flutter-plugins
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/.pub-cache
---------MY pubspec.yml-------
sdk: ">=3.0.0 <4.0.0"
dependencies:
dio: ^5.8.0+1
Expected Result
no error and work well.
Actual Result
Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 260.8s
Failed to build iOS app
Error (Xcode): ../../.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0/lib/src/adapter.dart:3:8: Error: Dart library 'dart:js_interop' is not available on this platform.
Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).
The text was updated successfully, but these errors were encountered: