If the file we're trying to grab from LocalStorage is userInfo, also try to grab the ajs_anonymous_id from LocalStorage. If it's not null, replace UserInfo.anonymousId with the value from the ajs_anonymous_id. This allows us to keep our anonymousId tracking consistent across Analytics.js and analytics_flutter.
Your _readFromStorage is generic and I'm introducing changes specific to an individual file, so this probably isn't ideal, but it at least gives you a visualization what I'm trying to do.
Addresses the issue I'm having https://github.com/segmentio/analytics_flutter/issues/46.
If the file we're trying to grab from LocalStorage is userInfo, also try to grab the ajs_anonymous_id from LocalStorage. If it's not null, replace UserInfo.anonymousId with the value from the ajs_anonymous_id. This allows us to keep our anonymousId tracking consistent across Analytics.js and analytics_flutter.
Your _readFromStorage is generic and I'm introducing changes specific to an individual file, so this probably isn't ideal, but it at least gives you a visualization what I'm trying to do.