Open SittiphanSittisak opened 3 years ago
perhaps something like
import
Same problem here, using universalio: 2.0.4
Error:
`Error: UnimplementedError
at Object.throw [as throw] (http://localhost:54985/dart_sdk.js:5041:11)
at Function.new (http://localhost:54985/packages/universal_io/src/io/sync_socket.dart.lib.js:3413:19)
at launchResume (http://localhost:54985/packages/my_resume/business/resume.dart.lib.js:19:35)
at launchResume.next (
`
Hi I am trying to use universal_io so that I can use open_file on web. When I try to create a new file using the same procedure as other people in this thread I am getting the same unimplemented error.
After some debugging I found the following thing to be going wrong @terrier989
@pragma('vm:entry-point') factory File(String path) { final overrides = IOOverrides.current; if (overrides == null) { throw UnimplementedError(); } return overrides.createFile(path); }
Line no : 221-228 File name : lib/src/io/file.dart
Within this code block overrides variable is becoming null which is causing this unimplementedError to be thrown.
Any update ? i'm facing same Error: UnimplementedError
The main issue is that File(path)
and Directory(path)
APIs aren't implemented on web.
terrier989 it would be great to have some example or guidelines how those could be supported on the web
flutter doctor
[√] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.19042.906], locale en-US) • Flutter version 2.0.4 at C:\flutter • Framework revision b1395592de (10 days ago), 2021-04-01 14:25:01 -0700 • Engine revision 2dce47073a • Dart version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\sitti\AppData\Local\Android\Sdk • Platform android-30, build-tools 30.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted.
[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.55.0) • VS Code at C:\Users\sitti\AppData\Local\Programs\Microsoft VS Code • Flutter extension can be installed from: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (2 available) • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.114 • Edge (web) • edge • web-javascript • Microsoft Edge 89.0.774.75
• No issues found!