PrefsDataStore
A Preferences DataStore that the app registers with PrefsDebugTab.create.
The tab reads and edits dataStore itself, so that the app sees an edit at once. DataStore allows one instance for each file in a process: the tab never opens one of its own, and it reads a store that the app does not register from its file, read-only.
DataStore is a compileOnly dependency of this artifact: the app that registers a store has DataStore 1.0 or newer, and coroutines with it. A byte array value needs DataStore 1.1.
Parameters
the keys whose values ValuePolicy.MASK_SENSITIVE shows although they look like they hold a secret, such as an oauth_scopes key, which has auth in its name but holds no secret. A name matches a key with exactly that name, in any case: it is no pattern. A JSON value of such a key shows whole, with no field replaced. It changes nothing under ValuePolicy.VISIBLE, which shows every value, or ValuePolicy.KEYS_ONLY, which shows none: the tab ignores it there, so that a change of the policy never shows more than the policy says.
the keys whose values the tab always leaves out, under every policy, also ValuePolicy.VISIBLE: a key whose name the check does not find, such as an account_info key that holds a JSON string with a token in it, or a key that must stay hidden when someone changes the policy. A name matches a key with exactly that name, in any case: it is no pattern. A key in both unmasked and masked is masked.
Throws
when name is empty or contains / or \.
Constructors
Properties
the instance that the tab reads and edits: the app's own.
what the tab shows of the values.
The keys whose values ValuePolicy.MASK_SENSITIVE shows, as the app passed them. A key matches in any case.