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

revert buggy web support #73

Merged
merged 1 commit into from
Jun 16, 2022
Merged

revert buggy web support #73

merged 1 commit into from
Jun 16, 2022

Conversation

MarcoDiGioia
Copy link
Contributor

@MarcoDiGioia MarcoDiGioia commented Jun 5, 2022

Proposed changes

Fixes #71
Removing conditions on import 'package:http/io_client.dart'; and import 'dart:io'; does not causes crash on flutter web.
Some tests with --platform chrome|firefox still failing but errors are caused by other stuff.

I did some tests running my changes in a real flutter web application and no error was thrown other than previous mentioned (only for web). See Further comments section for details.

This fix will allow users to use this library on flutter web although with limited functionalities.

Type of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • My code follows the Dart coding convention
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works.
  • I have commented my code, particularly in hard-to-understand areas
  • I have added necessary documentation (if appropriate)

Further comments

After running my changes on real flutter web application an XMLHttpRequest error was thrown, but I solved that by configuring properly my backend CORS configuration. This is the same error that occurs during tests with --platform chrome.
Unfortunately, verify: false for SSL validity verify still not working on web. This require some large implementation (maybe also in http library, I didn't analyzed that so much). A new issue will have to be opened after merge.

@MarcoDiGioia MarcoDiGioia changed the title Fixes #8 Fixes #71 Jun 5, 2022
@sehnryr
Copy link
Collaborator

sehnryr commented Jun 5, 2022

If we remove the conditional imports, support for web will not be shown on pub.dev. It can be tested by running pana inside the repo.

@MarcoDiGioia
Copy link
Contributor Author

That's true but maybe it would be better a "not official supported library" instead of a "not working supported library"

@sehnryr sehnryr changed the title Fixes #71 revert buggy web support d7f9e231bc0c8df212a0dc10f782bf03374d3613 Jun 16, 2022
@sehnryr sehnryr merged commit 0f097d2 into jossef:master Jun 16, 2022
@sehnryr sehnryr changed the title revert buggy web support d7f9e231bc0c8df212a0dc10f782bf03374d3613 revert buggy web support Jun 16, 2022
@MarcoDiGioia MarcoDiGioia deleted the 8 branch June 18, 2022 13:20
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

Successfully merging this pull request may close these issues.

Flutter Web not working (HttpClient not found)
2 participants