owlnext_dropzone 0.1.4
owlnext_dropzone: ^0.1.4 copied to clipboard
Olwnext dropzone widget
0.1.4 #
- fixed duplicate file on paste (happened after deleting file from the list): it was caused by a pointer issue using removeWhere directly on a platform file causing inconsistant clear of the desired file to delete. so we moved to a deletion by index instead of memory hash comparaison
- [OwlnextDropzone] now uses fileUtils.fileList to display selected file instead of a local state mirroring it (that local fileList was named currentFileList)
0.1.3 #
- check file exceptions (allowedFormats, allowedSize) on copy/paste flow
- added allowCtrlVPaste attribute, default to false
- added FileTooLargeException
- added FileNotAllowedException
- added visual display of those exceptions
0.1.2 #
-
remapped default dotted border wrapper to Colors.grey instead of primary
-
removed currentFilesToUpload.clear() from dispose which was causing state issues on re-instantiating [OwlnextDropzone] after a fast unmounting
-
code cleaning (moved some public methods to private)
0.1.1 #
- better image extension parsing for document icon resolving now PNG and uppercase format are recognized
0.1.0 #
-
removed dependency to :
- universal_html
- url_launcher
- nirrti
- owlnext_utils
- dotted_border
-
fix paste on IOS, Windows
-
fix drag & drop on IOS, windows
if you want to use FileUtils.downloadFile() in web context, you will need to inject a specific behavior from your app. Create a file in your app, loaded only in library.html context (web) and call
import 'package:universal_html/html.dart';
void setup() {
DownloadFileWebBypass().setDownloadFileWebFunction(_downloadFileWebImplementation);
}
Future<void> _downloadFileWebImplementation(Uint8List bytes, String fileName, String extension) async {
final base64 = base64Encode(bytes);
// Create the link with the file
final anchor = AnchorElement(
href: 'data:application/octet-stream;base64,$base64')
..target = 'blank'
..download = fileName;
// trigger download
document.body?.append(anchor);
anchor.click();
anchor.remove();
}
0.0.1 #
- Moving all file related widgets