shared_preferences_explorer 0.2.0 copy "shared_preferences_explorer: ^0.2.0" to clipboard
shared_preferences_explorer: ^0.2.0 copied to clipboard

A Flutter package for on-screen viewing of shared_preferences. Supports SharedPreferences, SharedPreferencesAsync, and SharedPreferencesWithCache.

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(),
    ),
  );
}
copied to clipboard
  • You can optionally provide a SharedPreferences instance to the instance parameter. If not provided, SharedPreferences.getInstance() or SharedPreferencesAsync() will be used.

  • The anchor button is draggable, and the initial position can be set using initialAnchorAlignment parameter.


Or, use SharedPreferencesExplorerScreen anywhere in your app. #

Or, use SharedPreferencesExplorerAsyncScreen as well.

Navigator.of(context).push(
  MaterialPageRoute<void>(
    builder: (context) =>
        const SharedPreferencesExplorerScreen(
            // /*Optional*/ instance:
            ),
  ),
);
copied to clipboard

Note #

  • The cache feature of SharedPreferencesWithCache is ignored, and the latest value is always retrieved.
5
likes
150
points
111
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

2024.08.26 - 2025.03.10

A Flutter package for on-screen viewing of shared_preferences. Supports SharedPreferences, SharedPreferencesAsync, and SharedPreferencesWithCache.

Repository (GitHub)

Topics

#shared-preferences

Documentation

API reference

License

MIT (license)

Dependencies

flutter, shared_preferences

More

Packages that depend on shared_preferences_explorer