-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is there an existing issue or discussion for this?
- I have searched the existing issues & discussions
Primary Information
- Flutter (Channel main, 3.38.0-1.0.pre-330)
- docman 1.2.0Steps to Reproduce
I'm encountering an issue where calling readAsBytes() inside a listDocumentsStream() iteration causes the stream to block indefinitely. The stream stops emitting new events and never completes.
Expected Behavior
The stream should continue emitting all files in the directory
Each file should be processed and both "File: [name]" and "test" should be printed for every file
The stream should complete normally after all files are processed
Current/Actual Behavior
Only the first file is processed completely
The stream blocks after the first iteration
No additional files are emitted and the stream never completes
Code sample
Code sample
final dir = await DocumentFile.fromUri(source.paths[0]);
await for (final file in dir!.listDocumentsStream()) {
if (file.isDirectory) continue;
print("File: ${file.name}");
file.readAsBytes().last.then((v) {
print("test");
});
}Screenshots or Video
No response
Debug Information, Logs
Logs / Debug information
I/flutter (21771): File: IMG_7182.JPG
I/flutter (21771): test
[No further output - stream blocks]Possible Solution
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working