-
-
Notifications
You must be signed in to change notification settings - Fork 996
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(package_info_plus)!: Migrate to js_interop for conditional export #2622
Conversation
Why is the description saying "Fix for a device_info_plus ticket" but the code is Can you provide more information in the PR description regarding this change as well? |
@miquelbeltran it is a mistake, actually I use package info plus not device info plus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit confusing.
The package already uses web
, so the ticket you created seems to be wrong. Can you elaborate on that?
@@ -4,7 +4,7 @@ import 'package:flutter_web_plugins/flutter_web_plugins.dart'; | |||
import 'package:http/http.dart'; | |||
import 'package:package_info_plus_platform_interface/package_info_data.dart'; | |||
import 'package:package_info_plus_platform_interface/package_info_platform_interface.dart'; | |||
import 'package:web/helpers.dart' as web; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to leave helpers.dart, because we want to support web 0.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I will revert it back if the PR open again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewer made an alternative PR already
@@ -9,7 +9,7 @@ import 'package:package_info_plus_platform_interface/package_info_platform_inter | |||
|
|||
export 'src/package_info_plus_linux.dart'; | |||
export 'src/package_info_plus_windows.dart' | |||
if (dart.library.html) 'src/package_info_plus_web.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to this document you need to use js_interop for conditional import to support WASM,
am I wrong?
https://dart.dev/interop/js-interop/package-web
|
The migration happened a few months ago already #2316 |
@vbuberen according to this document you need to use js_interop for conditional import so are you sure it is compatible with WASM with dart.library.html? |
@vbuberen I replied to this
we have a different time zones so I replied late as I made this PR night and I checked it noontime |
I have just explained to you why you shouldn't tag people and you still continue 🤦🏻
It doesn't matter. In case PR had a proper description with links (like the one that I created instead) and didn't reference an issue |
Next time please provide a clear and full description as people might not be in the context of what you have in your head. With that being said locking this discussion as there is nothing to discuss more. |
Description
I removed html for conditional import and used js_interop to support WASM
Related Issues
Checklist
CHANGELOG.md
nor the plugin version inpubspec.yaml
files.flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
!
in the title as explained in Conventional Commits).