create

fun create(context: Context, files: List<PrefsFile> = emptyList(), dataStores: List<PrefsDataStore> = emptyList(), discover: Boolean = true, discoveredReadOnly: Boolean = true): PrefsDebugTab

Creates a PrefsDebugTab.

Parameters

context

a context of the app.

files

the SharedPreferences files to show with a policy of their own.

dataStores

the Preferences DataStores to show with a policy of their own.

discover

whether to show the other files in the app's shared_prefs and files/datastore directories too.

discoveredReadOnly

whether the discovered SharedPreferences files are read-only; Lustro's own file, lustro_debug, and a discovered data store are read-only either way.

Throws

when two of files, or two of dataStores, have the same name.

No-op build: the tab keeps no context and opens no file. The names are only checked, so that a list the runtime rejects fails in release too.