Norbert515 / dynamic_theme

Dynamically changing your theme without hassle
MIT License
322 stars 68 forks source link

Flutter v2 updates #55

Closed tverra closed 3 years ago

tverra commented 3 years ago

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.

tverra commented 3 years ago

I'll close this, since it has been solved by #56.