V1 calendrier
This commit is contained in:
@@ -49,16 +49,14 @@ class _DropzoneUploadWidgetState extends State<DropzoneUploadWidget> {
|
||||
for (final file in files) {
|
||||
final name = await _dropzoneController!.getFilename(file);
|
||||
final bytes = await _dropzoneController!.getFileData(file);
|
||||
if (bytes != null) {
|
||||
final ref = FirebaseStorage.instance.ref().child(
|
||||
'events/temp/${DateTime.now().millisecondsSinceEpoch}_$name');
|
||||
final uploadTask = await ref.putData(bytes);
|
||||
final url = await uploadTask.ref.getDownloadURL();
|
||||
if (!newFiles.any((f) => f['name'] == name && f['url'] == url)) {
|
||||
newFiles.add({'name': name, 'url': url});
|
||||
}
|
||||
final ref = FirebaseStorage.instance.ref().child(
|
||||
'events/temp/${DateTime.now().millisecondsSinceEpoch}_$name');
|
||||
final uploadTask = await ref.putData(bytes);
|
||||
final url = await uploadTask.ref.getDownloadURL();
|
||||
if (!newFiles.any((f) => f['name'] == name && f['url'] == url)) {
|
||||
newFiles.add({'name': name, 'url': url});
|
||||
}
|
||||
}
|
||||
}
|
||||
widget.onFilesChanged(newFiles);
|
||||
setState(() {
|
||||
_success = "Fichier(s) ajouté(s) !";
|
||||
@@ -233,7 +231,7 @@ class _DropzoneUploadWidgetState extends State<DropzoneUploadWidget> {
|
||||
contentPadding: EdgeInsets.zero,
|
||||
dense: true,
|
||||
);
|
||||
}).toList(),
|
||||
}),
|
||||
SizedBox(
|
||||
width: 160,
|
||||
child: ElevatedButton.icon(
|
||||
|
||||
Reference in New Issue
Block a user