Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm trying to migrate my apps to nullsafety since Flutter 2.0 is in the stable channel now. This package depends on
shared_preferences 0.5.x
, which prevents me from upgrading to version2.0.x
. The new version has a breaking change; "Setters no longer accept null to mean removing values. If you were previously using set*(key, null) for removing, use remove(key) instead.". Since this package doesn't remove values by passing null to a setter, it should be safe to upgrade. https://pub.dev/packages/shared_preferences/changelogIt's probably a good idea to make this a major version upgrade, to maintain compatability with projects that doesn't use
shared_preferences 2.0.x
. This woluld also open the possibility of adding other null-safety related upgrades down the line.I also took the libery of fixing some deprecation warnings.