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

fix(device_info_plus): Update exports to avoid web compatibility issues #2028

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

vbuberen
Copy link
Collaborator

@vbuberen vbuberen commented Aug 5, 2023

Description

According to #1651 device_info_plus might cause some analyzer issues to other packages which use the plugin. After looking at code it looks like we already had a conditional export for windows part, so this PR adds the same condition to linux part to be sure that there are no unsupported libraries used for web (at least from package analyzer point of view).

Related Issues

Fixes #1651

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

Comment on lines +28 to 31
export 'src/device_info_plus_linux.dart'
if (dart.library.html) 'src/device_info_plus_web.dart';
export 'src/device_info_plus_windows.dart'
if (dart.library.html) 'src/device_info_plus_web.dart';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we chain two if clauses, instead of exporting the same library twice?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, unfortunately we can't. As far as I understand there are no issues with such export or, otherwise, we would see failing builds.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge to release new versions in nearest time

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.

[device_info_plus]: According to package analysis, device_info_plus 8.1.0 is not Web compatible??
2 participants