Skip to content

Conversation

@alexcmgit
Copy link
Member

@alexcmgit alexcmgit commented Jul 15, 2022

Warning This pull request depends of #85, so it can't be merged before this one.

This PR does improvements on the file card:

Changes within /example project

  • Implement functionality: create a file within a folder through Create custom document button.
  • Add a button to edit the file contents (Danger button).
  • Add a button to erase the file contents (Danger button).
    • The content is written by the user through a text field dialog.
  • Add a button to append (FileMode.append) contents to a file (Danger button).
  • Modify the current button behavior implemented on Add writeToFile, writeToFileAsBytes, writeToFileAsString #85: now it overwrite the file with a random number to make easier to see if the file is really being overwritten.
  • Add a confirmation dialog before all write based operations (delete, overwrite, append, edit), including folders.
  • Add a collapsed state on the file card (it's now default) and a expanded state.
  • Add icon thumbnails when image thumbnails are not available for apk image/* video/* directory/* documents.
  • Refactor FileExplorerCard component (Main file component).
  • Add a limit of 10mb when trying to read a file content.

Changes within the plugin

  • Replace all uses of PartialDocumentFile with DocumentFile class, affected APIs: listFiles.
  • All fields of the DocumentFile class it's now nullable except of Uri uri.
  • In order to make DocumentFile usable within listFiles API, were added 2 new fields: id, parentUri and lastModified now returns a DateTime? instead of a Future<DateTime?>.
  • createFile now doesn't requires content or bytes param, it's a empty String by default.

To see details of writeToFile API refer to #85, #79 and #61.

@alexcmgit alexcmgit added the stage:dev This issue/feature doesn't seems to be stable enough to be considered released in the next version. label Jul 15, 2022
@alexcmgit alexcmgit changed the base branch from master to all-contributors/add-for July 16, 2022 19:46
@alexcmgit alexcmgit changed the base branch from all-contributors/add-for to master July 16, 2022 19:46
@alexcmgit alexcmgit added stage:stable This issue/feature/resource seems to be stable enough to be considered released in the next version. and removed stage:dev This issue/feature doesn't seems to be stable enough to be considered released in the next version. labels Jul 17, 2022
@alexcmgit alexcmgit merged commit b2e9352 into master Jul 17, 2022
@alexcmgit alexcmgit mentioned this pull request Jul 17, 2022
@alexcmgit alexcmgit deleted the feat/add-write-to-file-actions branch July 24, 2022 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stage:stable This issue/feature/resource seems to be stable enough to be considered released in the next version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants