Skip to content

Conversation

@Vinzent03
Copy link
Collaborator

@Vinzent03 Vinzent03 commented Sep 14, 2025

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

To get the current platform for custom headers dart:io is used. This causes no issues on web using flutter, but building a web app with solely Dart causes issues.

What is the new behavior?

Use conditional imports to only use dart:io when available.
I've also added tests to prevent this issue in the future.

Additional context

close #1219

@Vinzent03 Vinzent03 changed the title feat: add mini dart web app example fix: Prevent web incompatibility due to import of dart:io Sep 14, 2025
@Vinzent03 Vinzent03 requested a review from grdsdev September 14, 2025 14:54
@coveralls
Copy link

Pull Request Test Coverage Report for Build 17712639281

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 80.743%

Totals Coverage Status
Change from base Build 17477396007: 0.01%
Covered Lines: 3107
Relevant Lines: 3848

💛 - Coveralls

@Vinzent03 Vinzent03 merged commit 3c8d4db into main Sep 15, 2025
12 of 14 checks passed
@Vinzent03 Vinzent03 deleted the fix/dartio-usage branch September 15, 2025 19:03
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.

Web incompatibility due to import of dart:io

4 participants