Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.ipr

*.iws
.idea/

Expand All @@ -24,3 +25,5 @@ migrate_working_dir/
build/
#Custom
.devices/

.cursor/
97 changes: 55 additions & 42 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,102 @@
## 1.2.1

- **Bug Fix**: Fixed issue where some SAF providers (like Termux) strip file extensions from `DocumentFile.name`.
- Added `displayName` property to expose the raw provider display name
- Added `fileName` property for computed filename with extension
- The `name` property now automatically preserves file extensions by computing them from MIME type when needed
- This ensures consistent behavior across all SAF providers

## 1.2.0

* New Feature: Added method `all()` for `DocMan.dir` helper.
- New Feature: Added method `all()` for `DocMan.dir` helper.
It's a simple way to get all app directories in one call as map.

```dart
```dart
/// Get all app directories as map with keys as directory names and values as paths.
final Map<String, String> dirs = await DocMan.dir.all();
///Result example:
{
"cache": "/data/user/0/com.example.app/cache",
"files": "/data/user/0/com.example.app/files",
"data": "/data/user/0/com.example.app/app_flutter",
// External directories, can be empty strings if not available.
"cacheExt": "/storage/emulated/0/Android/data/com.example.app/cache",
"filesExt": "/storage/emulated/0/Android/data/com.example.app/files",

///Result example:
{
"cache": "/data/user/0/com.example.app/cache",
"files": "/data/user/0/com.example.app/files",
"data": "/data/user/0/com.example.app/app_flutter",
// External directories, can be empty strings if not available.
"cacheExt": "/storage/emulated/0/Android/data/com.example.app/cache",
"filesExt": "/storage/emulated/0/Android/data/com.example.app/files",
}
```
* Feature: Added ability to instantiate `DocumentThumbnail` from `Content Uri` or `File.path`.
```

- Feature: Added ability to instantiate `DocumentThumbnail` from `Content Uri` or `File.path`.
Same as `DocumentFile.thumbnail()` method, but now you can get `DocumentThumbnail` directly.

```dart
```dart
/// Create thumbnail from content uri or file path.
final DocumentThumbnail thumbnail = await DocumentThumbnail.fromUri(
contentUriOrFilePath,
width: 100,
height: 100,
png: true,
contentUriOrFilePath,
width: 100,
height: 100,
png: true,
);
```
* Feature: Added syntax sugar for `DocumentFile` instantiation from `Content Uri` or `File.path`.
```

- Feature: Added syntax sugar for `DocumentFile` instantiation from `Content Uri` or `File.path`.

```dart
```dart
/// New syntax sugar for DocumentFile instantiation from content uri or file path.
final DocumentFile? doc = await DocumentFile.fromUri(contentUriOrFilePath);

/// Old way.
final DocumentFile? doc = await DocumentFile(contentUriOrFilePath).get();
```
* Fix: problem with parallel calls to `DocumentFile` `action` methods, when working with different
```

- Fix: problem with parallel calls to `DocumentFile` `action` methods, when working with different
documents.
Now it's fixed. `DocManQueueManager` was primarily used for all `activity` methods, and it caused the problem.
For example, now it's possible to create list or grid of documents thumbnails without any problems.
If you were getting errors in log like `Error loading thumbnail: AlreadyRunning Method: documentfileaction`, it should
be fixed now.

* Fix: error in syntax in methods `DocumentFile.share()` & `DocumentFile.open()`.
- Fix: error in syntax in methods `DocumentFile.share()` & `DocumentFile.open()`.
String `title` parameter was not optional, but it should be. Now it's fixed.

Please check your code and change `title` parameter to optional if you are using these methods.

**From:**

```dart
final bool share = await doc.share('Share this document:');
final bool open = await doc.open('Open with:');
```

**To:**
```dart
final bool share = await doc.share(title: 'Share this document:');
final bool open = await doc.open(title: 'Open with:');
```

* Chore: Updated dependencies, updated example, updated README, some code cleanup & small fixes.
```dart
final bool share = await doc.share(title: 'Share this document:');
final bool open = await doc.open(title: 'Open with:');
```

- Chore: Updated dependencies, updated example, updated README, some code cleanup & small fixes.

## 1.1.0

* New Feature: Implemented simple custom `DocumentsProvider`
* Small fixes
* Updated README
* Updated example
* Updated dependencies
- New Feature: Implemented simple custom `DocumentsProvider`
- Small fixes
- Updated README
- Updated example
- Updated dependencies

## 1.0.2

* Fix: missed export of `PermissionsException` class
* Example: updated deprecated `withOpacity` to `withAlpha`
* Documentation fixes
- Fix: missed export of `PermissionsException` class
- Example: updated deprecated `withOpacity` to `withAlpha`
- Documentation fixes

## 1.0.1

* Readme fixes
* Screenshot
* Workflow fixes
- Readme fixes
- Screenshot
- Workflow fixes

## 1.0.0

* DocMan initial release
- DocMan initial release
Loading