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 #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 apkimage/*video/*directory/* documents.
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.
This PR does improvements on the file card:
Changes within
/example
projectCreate custom document
button.FileMode.append
) contents to a file (Danger button).apk
image/*
video/*
directory/*
documents.FileExplorerCard
component (Main file component).Changes within the plugin
PartialDocumentFile
withDocumentFile
class, affected APIs:listFiles
.DocumentFile
class it's now nullable except ofUri uri
.DocumentFile
usable withinlistFiles
API, were added 2 new fields:id
,parentUri
andlastModified
now returns aDateTime?
instead of aFuture<DateTime?>
.createFile
now doesn't requirescontent
orbytes
param, it's a empty String by default.To see details of
writeToFile
API refer to #85, #79 and #61.