v0.5.0
This release contains:
- Major breaking changes.
- New API to edit existing files.
- Example project improvements.
- Bug fixes.
To see details, refer to rollup PR #100.
New
- Added
writeToFile,writeToFileAsStringandwriteToFileAsBytesAPIs to allow overwrite existing files by appending (FileMode.append) or truncatingFileMode.write(@jfaltis).
Breaking changes
listFilesit's now returns aStream<DocumentFile>instead ofStream<PartialDocumentFile>.DocumentFile.lastModifiedit's now returns aDateTime?instead ofFuture<DateTime?>(removed the asynchronous plugin call).- All
DocumentFileclass fields are now nullable except byDocumentFile.uri. createFiledoesn't requirescontentorbytesanymore, it's now possible to just create the file reference without defining the file data, it'll be a emptyStringby default.
Bug fixes
DocumentFile.canReadit's now calling the right API (canRead) instead of the similar one (canWrite).- Fix infinite loading of
getDocumentThumbnailAPI when thumbnail is not available.
Example project
- The example project is no longer dependant of
permission_handlerplugin to requeststoragepermission since it's already fully integrated with Storage Access Framework. - File cards have now a expanded and collapsed state instead of showing all data at once.
- Icon thumbnails were added to
.apkimage/*,video/*,text/plainanddirectoriesto make easier to see what is the type of the file while navigating between the folders. - 4 new buttons were added related to
writeToFileAPI: Write to file (Overwrite file contents with a predefined string), Append to file (Append a predefined string to the end of the file), Ease file content (Self explanatory: erase it's data but do not delete the file) and Edit file content (Prompt the user with a text field to define the new file content), all buttons requires confirmation since it can cause data loss. - It's now possible to create a file with a custom name through the UI (Create a custom document action button on top center of the file list page).
- File card now shows the decoded uris to fix the visual pollution.