Browse Source

[path_provider] add getApplicationCacheDirectory method implementation

getApplicationCacheDirectory
Марков Сергей Викторович 1 year ago
parent
commit
0b06f27dc0
  1. 6
      example/lib/packages/path_provider/model.dart
  2. 5
      example/lib/packages/path_provider/page.dart
  3. 1
      packages/path_provider/path_provider_aurora/README.md

6
example/lib/packages/path_provider/model.dart

@ -43,6 +43,12 @@ class PathProviderModel extends Model {
return null;
}
/// Directory location where user-specific non-essential (cached) data should be written.
Future<Directory?> getApplicationCacheDirectory() async {
return getApplicationCacheDirectory();
}
/// Directory containing user document files.
Future<Directory?> getApplicationDocumentsDirectory() async {
try {

5
example/lib/packages/path_provider/page.dart

@ -54,6 +54,11 @@ class _PathProviderPageState extends AppState<PathProviderPage> {
desc: l10n.pathProviderDescTemporary,
future: model.getTemporaryDirectory(),
),
BlockItem(
title: l10n.pathProviderTitleTemporary,
desc: l10n.pathProviderDescTemporary,
future: model.getApplicationCacheDirectory(),
),
BlockItem(
title: l10n.pathProviderTitleApplicationDocuments,
desc: l10n.pathProviderDescApplicationDocuments,

1
packages/path_provider/path_provider_aurora/README.md

@ -35,6 +35,7 @@ final Directory? downloadsDir = await getDownloadsDirectory();
## Supported APIs
- [x] `getTemporaryDirectory` - Directory location where user-specific non-essential (cached) data should be written
- [x] `getApplicationCacheDirectory` - alias of getTemporaryDirectory
- [x] `getApplicationSupportDirectory` - Directory where the application may place application support files.
- [ ] `getLibraryDirectory`
- [x] `getApplicationDocumentsDirectory` - Directory containing user document files.

Loading…
Cancel
Save