Fix flutter analyze errors: correct Blob constructor usage and dispose method

This commit is contained in:
Leon Bösche
2026-01-25 01:31:33 +01:00
parent 88f1f5d87e
commit edced8825d
2 changed files with 9 additions and 3 deletions

View File

@@ -108,7 +108,10 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
final bytes = await apiClient.getBytes(path);
final mimeType =
_fileData?['capabilities']?['mimeType'] ?? 'video/mp4';
final blob = web.Blob([bytes], mimeType);
final blob = web.Blob(
[Uint8List.fromList(bytes)], // ignore: argument_type_not_assignable
web.BlobPropertyBag(type: mimeType),
);
videoUrl = web.URL.createObjectURL(blob);
} catch (e) {
// Fallback to direct URL