-
-
Couldn't load subscription status.
- Fork 1.2k
[device_info_plus] make toMap() json compatible #950
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
[device_info_plus] make toMap() json compatible #950
Conversation
…e in web_browser_info_test (1)
|
Thank you! I am positive about this change. The only issue is that this would be a major version bump, so the platform plugin should be increased to 3.0.0, and all its dependencies as well. The change should be well documented in the respective Chanelogs. Any thoughts? @vbuberen |
I am not sure why do we need it. |
|
@miquelbeltran @vbuberen |
mmhhh... I am more inclined now to make toJson() a new method rather than modifying the toMap(), that way this is not going to be a breaking change. What do you think about that @iapicca ? |
@miquelbeltran |
This comment was marked as outdated.
This comment was marked as outdated.
|
I am sorry, I am not sure anymore if we need this. If a user wants to serialize the contents of a |
@miquelbeltran |
Yes, I agree with that. The Readme.md says:
If the serialization using toMap doesn't work because it uses enums, then it must be fixed! |
|
I did merge properly before, now it's up to date
@miquelbeltran extension BaseDeviceInfoToJsonX on BaseDeviceInfo {
Map<String, Object?> Function() get toJson => toMap;
} |
|
Thanks! can you cleanup the PR, and limit the changes to the web plugin implementation? |
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.
All changes not related to the fix should be reverted
packages/device_info_plus/device_info_plus_platform_interface/CHANGELOG.md
Outdated
Show resolved
Hide resolved
@miquelbeltran a) remove b) keep
|
Description
updated: makes
toMapcompatible with json parsingRelated Issues
fix #949
Checklist
pubspec.yamlandCHANGELOG.md.///).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?
TODO:
after publishing,
bump
device_info_plus_platform_interfaceto^2.3.1indevice_info_plus's pubspec