Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter web support #61

Open
jaumard opened this issue Aug 31, 2019 · 2 comments
Open

Flutter web support #61

jaumard opened this issue Aug 31, 2019 · 2 comments

Comments

@jaumard
Copy link
Contributor

jaumard commented Aug 31, 2019

I'm trying to port my app to support web, but I'm getting this compilation error:

Dart2Js finished with:                                                  

packages/http/src/multipart_file.dart:14:8:
Error: Error when reading 'packages/http/src/multipart_file_stub.dart': Error reading 'packages/http/src/multipart_file_stub.dart'  (No such file or
directory)
import 'multipart_file_stub.dart'
       ^
packages/http/src/multipart_file.dart:93:7:
Error: Method not found: 'multipartFileFromPath'.
      multipartFileFromPath(field, filePath,
      ^^^^^^^^^^^^^^^^^^^^^
Error: Compilation failed.

I guess Jaguar is doing something (importing or using some http stuff) that are not available for the web platform.

@tejainece any idea ?

@jaumard
Copy link
Contributor Author

jaumard commented Sep 6, 2019

One lead would be to not use the http package and instead use the native HttpClient https://api.flutter.dev/flutter/dart-io/HttpClient-class.html

@jaumard
Copy link
Contributor Author

jaumard commented Sep 13, 2019

Apparently http package is compatible web, but not for multipart requests (and will probably don't be for those) so another solution is to put an abstraction for multipart request and do nothing on web.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant