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 version 2.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/changelog
It'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.
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.