-
-
Notifications
You must be signed in to change notification settings - Fork 973
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): Added toMap method #1926
Conversation
While I like it, we deprecated |
I see the problem, can I create a data getter that retrieves data from the toMap as done for device_info_plus? @nohli |
packages/package_info_plus/package_info_plus/lib/package_info_plus.dart
Outdated
Show resolved
Hide resolved
Thanks for the change. Makes sense to me, since we have it Left a code suggestion. |
…plus.dart Co-authored-by: Joachim Nohl <43643339+nohli@users.noreply.github.com>
Great, I like it. Would you mind adding tests? Can set the data with
|
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.
LGTM!
Description
This PR adds a
toMap()
function to thePackageInfo
class in thepackage_info_plus
plugin. Previously, this functionality was missing. ThetoMap()
function returns a map representation of thePackageInfo
instance. Notably, thebuildSignature
andinstallerStore
fields are included in the map only if they are non-null and non-empty. This change ensures that the returned map only contains meaningful and useful data.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?