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

feat: support web in package:platform #862

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vaind
Copy link

@vaind vaind commented Feb 18, 2025

platform provides a mockable interface for dart:io platform. I've suggested to the team that we use it to replace our custom implemention of the same concept with this package.

However, I've failed to notice that pub.dev/packages/platform does not support web.

My suggestion is to add this, even if it's just with the information that can be gather with what is available on web.
Note: I have not actually researched and implemented any of the specific getters, just wanted to verify that it would make sense and wanted to show how it could look like in the code, with the conditional export.

If maintainers are open to introducing dart2js & dart2wasm support, I could update the code in local_platform_web.dart and add tests


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

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

Successfully merging this pull request may close these issues.

1 participant