Data sources
Expose preferences and databases to the Shared Preferences and Database tools.
The Shared Preferences and Database tools are driven by two small interfaces. The toolkit includes adapters for the storage CARP apps use (shared_preferences and sembast), and you can implement the interfaces yourself for any other storage.
| Interface | Powers | Config field | Built-in adapter |
|---|---|---|---|
KeyValueStore | Shared Preferences tool | DebugToolkitConfig.keyValueStores | SharedPreferencesKeyValueStore |
DebugDatabase | Database tool | DebugToolkitConfig.databases | SembastDebugDatabase |
Key/value stores
KeyValueStore powers the Preferences tool (inspect, search, edit, add and delete). Pass one or more stores with DebugToolkitConfig.keyValueStores:
By default, SharedPreferencesKeyValueStore hides DebugEnv's own override keys (carp_debug_env.*) from the listing and from "clear all", so the inspector never clobbers the launch-argument override store. Customize this with hiddenPrefixes:
Custom key/value store
The supported value types for write are String, bool, int, double and List<String>.
Databases
DebugDatabase powers the Database tool (browse stores, then records, and delete). Pass one or more databases with DebugToolkitConfig.databases:
sembast does not enumerate its stores at runtime, so you list the StoreRefs you want to inspect. Any key and value types are accepted.