fix(device_info_plus): fix type casting for WASM
Description
Fix some types casting on web implementation for WASM compilation
Related Issues
- FIX #2966
Checklist
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] I titled the PR using Conventional Commits.
- [x] I did not modify the
CHANGELOG.mdnor the plugin version inpubspec.yamlfiles. - [x] All existing and new tests are passing.
- [x] The analyzer (
flutter analyze) does not report any problems on my PR.
FIX https://github.com/fluttercommunity/plus_plugins/issues/2966
The mentioned issue is about package_info_plus, while your changes are for device_info_plus.
Could you explain why you did the change in this PR? device_info_plus supports a range of web versions https://github.com/fluttercommunity/plus_plugins/blob/main/packages/device_info_plus/device_info_plus/pubspec.yaml#L40 and works well with both web 0.5.1 and 1.0.0 at the moment.
I'm sorry,I got confused, I did notice the PR was for package_info_plus:
Still that the package device_info_plus, the one I'm fixing in this PR, has a similar problem when used in web compiled in WASM.
- The type of
deviceMemorycame out as adoubleon WASM - The
languagesfield it's aJSArray<JSString>so it needs to pass throughtoDart
Still that the package device_info_plus, the one I'm fixing in this PR, has a similar problem when used in web compiled in WASM.
I would ask you to open the issue first and fill in all the required data, because from just this statement it is not clear in which environment, which versions you used etc. As I mentioned we check WASM compilation as well and everything worked fine so far. So if you found an issue, it would be better to report is properly first, so we could have a constructive discussion about this PR.
The changes in this PR are the same as https://github.com/fluttercommunity/plus_plugins/pull/3254
Let's follow up on that other PR, I will close this one.
In all cases, thanks for the contribution @GiacomoPignoni !