Skip to content

v0.5.0

Choose a tag to compare

@alexcmgit alexcmgit released this 18 Jul 18:23
· 56 commits to release since this release
394cf26

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, writeToFileAsString and writeToFileAsBytes APIs to allow overwrite existing files by appending (FileMode.append) or truncating FileMode.write (@jfaltis).

Breaking changes

  • listFiles it's now returns a Stream<DocumentFile> instead of Stream<PartialDocumentFile>.
  • DocumentFile.lastModified it's now returns a DateTime? instead of Future<DateTime?> (removed the asynchronous plugin call).
  • All DocumentFile class fields are now nullable except by DocumentFile.uri.
  • createFile doesn't requires content or bytes anymore, it's now possible to just create the file reference without defining the file data, it'll be a empty String by default.

Bug fixes

  • DocumentFile.canRead it's now calling the right API (canRead) instead of the similar one (canWrite).
  • Fix infinite loading of getDocumentThumbnail API when thumbnail is not available.

Example project

  • The example project is no longer dependant of permission_handler plugin to request storage permission 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 .apk image/*, video/*, text/plain and directories to make easier to see what is the type of the file while navigating between the folders.
  • 4 new buttons were added related to writeToFile API: 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.