Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Erase file contents and Append file contents file options #94

Merged
merged 6 commits into from
Jul 17, 2022

Conversation

alexrintt
Copy link
Owner

@alexrintt alexrintt 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.

@alexrintt alexrintt 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
@alexrintt alexrintt changed the base branch from master to all-contributors/add-for July 16, 2022 19:46
@alexrintt alexrintt changed the base branch from all-contributors/add-for to master July 16, 2022 19:46
@alexrintt alexrintt 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
@alexrintt alexrintt merged commit b2e9352 into master Jul 17, 2022
@alexrintt alexrintt mentioned this pull request Jul 17, 2022
@alexrintt alexrintt 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.

1 participant