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: ✨ Added platform helper #130

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Mithos5r
Copy link

Currently pubdev says that the widget is not web compatible. This happens because there is an IO import being performed all the time.

The proposed change is to create a get that is in charge of telling if the operating system has shortcuts or not. Always import the web one that only has foundation and in case the compilation library is an IO one, export the get that has IO with the platform.

Actually it works in the web version even with the import because the check if is web happens first.

I think with this small change pubdev should detect it correctly and it helps to understand the reason for the if. If this is not the case you could implement an abstract class and implement it for each type of library whether it is html or io.

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.

1 participant