-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on Flutter web for media files without album art #28
Comments
FYI, with the following quick fix it seems to work: flutter_media_metadata_web.dart: line 109 -113:
replaced by:
Haven't yet checked if an album art is derived it the file contains one. |
It's right and I have the same issue. Error: Expected a value of type 'String', but got one of type 'Null' |
Hi,
Following piece of code:
[...]
I checked this with mp3, m4a and wmv files. It only occurs on Flutter web. If the audio files contain an album art everything works fine. If they do not contain an album art, I get the following error message:
Error: Expected a value of type 'String', but got one of type 'Null'
at Object.throw_ [as throw] (http://localhost:50323/dart_sdk.js:5067:11)
at Object.castError (http://localhost:50323/dart_sdk.js:5026:15)
at Object.cast [as as] (http://localhost:50323/dart_sdk.js:5351:17)
at Function.as (http://localhost:50323/dart_sdk.js:46170:19)
at http://localhost:50323/packages/flutter_media_metadata/src/flutter_media_metadata_web.dart.lib.js:89:159
at Object._checkAndCall (http://localhost:50323/dart_sdk.js:5274:16)
at Object.dcall (http://localhost:50323/dart_sdk.js:5279:17)
at ret (http://localhost:50323/dart_sdk.js:62346:21)
Afaik this relates to the following line of code:
let metadata = new (T.IdentityMapOfString$dynamic()).from(["metadata", new _js_helper.LinkedMap.new(), "albumArt", convert.base64Decode(core.String.as(dart.dsend(rawMetadataJson, '_get', ["Cover_Data"]))), "filePath", null]);
I cannot read nor write .js :) but it looks like a null check is missing?
What else do you need?
Thanks,
Michael
The text was updated successfully, but these errors were encountered: