useBaseDirectory property
If running from Flutter, the default base directory is the application's documents dir.
If running from tests (detected by the LocalFileSystem
not being present),
it will use the system's temp directory.
You can change this variable to globally change the directory:
// Will use the application's cache directory.
LocalPersist.useBaseDirectory = LocalPersist.useAppCacheDir;
// Will use the application's downloads directory.
LocalPersist.useBaseDirectory = LocalPersist.useAppDownloadsDir;
// Will use whatever Directory is given.
LocalPersist.useBaseDirectory = () => LocalPersist.useCustomBaseDirectory(baseDirectory: myDir);
Implementation
static Future<void> Function() useBaseDirectory = LocalPersist.useAppDocumentsDir;