View and edit SharedPreferences and secure storage in Flutter

Testing an onboarding flow, an expired token or a feature flag usually means clearing app data or adding a debug screen. With xRay you see the SharedPreferences and flutter_secure_storage of your running Flutter app in a desktop app, and change them while the app runs.

SharedPreferences

final prefs = await SharedPreferences.getInstance();
final sharedPrefsInspector = XRaySharedPreferencesInspector(prefs: prefs);

Every key shows with its type: String, bool, int, double or List<String>. An edit is written back with the same type, so your app keeps reading it with the same getter. Add new keys of any of these types, and edit JSON values in place.

flutter_secure_storage

final secureStorageInspector = XRaySecureStorageInspector();

Pass your own FlutterSecureStorage when your app sets Android or iOS options. Secure storage often holds tokens, so keep the connection protected and only include the inspector in debug builds.

Any other store

Implement XRayKeyValueSource to show any key-value store in xRay, for example a Hive box or your own cache. The key-value inspection guide shows how.

See what changed, and when

Every change your app makes to its storage appears on the timeline, next to the network call or log that caused it. An exported session holds a snapshot of the storage plus every change, so a teammate sees the same state.

What testers use it for

Try xRay

xRay runs on macOS, Windows and Linux and is free during the alpha. It needs an impaktfull account with approved alpha access.