resolveStorage function
Resolve the default storage for the current platform. A caller-supplied storage always wins. Falls back to in-memory when no durable platform store is reachable.
Implementation
AnalyticsStorage resolveStorage([AnalyticsStorage? override]) {
if (override != null) return override;
try {
final s = platform.createPlatformStorage();
if (s != null) return s;
} catch (_) {
// Any platform-storage failure degrades silently to memory.
}
return createMemoryStorage();
}