shared_preferences_explorer
A Flutter package for on-screen viewing of shared_preferences.
Supports SharedPreferences, SharedPreferencesAsync, and SharedPreferencesWithCache.
![]() |
![]() |
|---|
Usage
There are two types of APIs.
Wrap your app's root widget with SharedPreferencesExplorer, and tap the anchor button to open.
If you are using SharedPreferencesAsync or SharedPreferencesWithCache in your app, use SharedPreferencesAsyncExplorer instead.
void main() {
runApp(
SharedPreferencesExplorer(
// /*Optional*/ instance:
// /*Optional*/ initialAnchorAlignment:
child: YourApp(),
),
);
}
-
You can optionally provide a
SharedPreferencesinstance to theinstanceparameter. If not provided,SharedPreferences.getInstance()orSharedPreferencesAsync()will be used. -
The anchor button is draggable, and the initial position can be set using
initialAnchorAlignmentparameter.
Or, use SharedPreferencesExplorerScreen anywhere in your app.
Or, use SharedPreferencesExplorerAsyncScreen as well.
Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) =>
const SharedPreferencesExplorerScreen(
// /*Optional*/ instance:
),
),
);
Note
- The cache feature of
SharedPreferencesWithCacheis ignored, and the latest value is always retrieved.

