Fix flutter analyze errors: correct Blob constructor usage and dispose method
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user