Floating-Dartists / matomo-tracker

A fully cross-platform wrap of the Matomo tracking client for Flutter, using the Matomo API.
https://pub.dev/packages/matomo_tracker
MIT License
26 stars 28 forks source link

Feat/replace shared prefs with local storage #54

Closed TesteurManiak closed 1 year ago

TesteurManiak commented 1 year ago

To simplify maintenance on the package I've abstracted the SharedPreferences with a LocalStorage class I've also added some exception and argument checks instead of assertion to leverage an error even in profile and release mode.

This cause a breaking change in MatomoTracker.initialize as you know can only pass a LocalStorage instead of a SharedPreferences.

Pierre-Monier commented 1 year ago

This is a good idea. People can now use whatever storage solution pleases them, although I think 99% will use shared_preferences. However, we need to add documentation about this change.

TesteurManiak commented 1 year ago

@Pierre-Monier You're right as this represents a major change for the next release on pub.dev I'll add a migration guide section to the README.