-
-
Notifications
You must be signed in to change notification settings - Fork 980
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)!: fixed webasm compliance #3254
Conversation
packages/device_info_plus/device_info_plus/lib/src/device_info_plus_web.dart
Show resolved
Hide resolved
packages/device_info_plus/device_info_plus/lib/src/device_info_plus_web.dart
Outdated
Show resolved
Hide resolved
Thanks @arnaudruffin this looks good to me now. I marked the PR as breaking, because it changes a user facing class member type, even if it is just changing from |
I would like to check a few things first. If all is good I will merge and release on Monday. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@GelistirmeKF This project is run by volunteers and the PR will be merged and released when we have the time to work on it. If you are in a hurry, create a fork and import the dependency directly as explained here: https://dart.dev/tools/pub/dependencies#git-packages |
Thanks @miquelbeltran for solution alternative. By this package, appreciate the community for valuable efforts
|
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.
The web
version on device_info_plus
needs to be set to ^1.0.0
, otherwise if Flutter resolves web 0.5
it won't compile.
I tried to push the commit, but GitHub rejected the push (did you enable allowing maintainers to push changes?)
The required change:
diff --git a/packages/device_info_plus/device_info_plus/pubspec.yaml b/packages/device_info_plus/device_info_plus/pubspec.yaml
index 3457c632..0a025afb 100644
--- a/packages/device_info_plus/device_info_plus/pubspec.yaml
+++ b/packages/device_info_plus/device_info_plus/pubspec.yaml
@@ -37,7 +37,7 @@ dependencies:
flutter_web_plugins:
sdk: flutter
meta: ^1.8.0
- web: ">=0.5.0 <2.0.0"
+ web: ^1.0.0
# win32 is compatible across v4 and v5 for Win32 only (not COM)
win32: ">=4.0.0 <6.0.0"
Hi @arnaudruffin can you do the requested changes? otherwise I will have to close the PR and create a new one. |
I managed to push the change to your main branch, git didn't let me at first. Once CI finishes, I will merge this. I'll do a release for all packages later today. |
Description
This PR allows device_info_plus to be used in a web project compiled to webasm.
For that a type had to be changed (devicememory became a double?) and one converted from JStype to dart type.
I also took the liberty to update the example "index.html" file, as it was based on a deprecated template and not compatible with webasm compilation.
Most of this commit is a copy of what was done in #3161 by @GiacomoPignoni . Credits go to him.
Related Issues
Checklist
CHANGELOG.md
nor the plugin version inpubspec.yaml
files.flutter analyze
) does not report any problems on my PR. => not directly on my modificationsBreaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
!
in the title as explained in Conventional Commits).