-
Notifications
You must be signed in to change notification settings - Fork 21
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
MemoryFileSystem File.readAsBytesSync() failure #635
Comments
When reading from a local file the data is correct in bytes. Once written to a MemoryFileSystem the data is retrieved incorrectly and requires an extra level of translation before it works. The below code does not work: The above code does not produce a displayable image from bytes from the original file. However, adding this line allows an image to be displayed properly without other changes (In the example here I use a MemoryImage. The impact is that a MemoryFileSystem.file can not be used for a FileImage provider. |
LocalFileSystem() has the correct behavior. |
I think that this should have been fixed by dart-archive/file.dart#123. |
Closing on assumption dart-archive/file.dart#123 fixed this |
MemoryFileSystem File.readAsBytesSync() produces different results than the default File.readAsBytesSync(). Adding Uint8List.fromList to the resultant bytes corrects the problem.
The text was updated successfully, but these errors were encountered: