Skip to content
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

Replace custom MultiImageStreamCompleter with flutter/foundation/MultiFrameImageStreamCompleter #949

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lwj1994
Copy link

@lwj1994 lwj1994 commented May 29, 2024

on 3.19,it will lead some ios crash

fix flutter/flutter#148927

There is no need to use Stram, as it will only fire once.

when result is FileInfo, it means download success.

      await for (final result in stream) {
        if (result is DownloadProgress) {
          chunkEvents.add(
            ImageChunkEvent(
              cumulativeBytesLoaded: result.downloaded,
              expectedTotalBytes: result.totalSize,
            ),
          );
        }
        if (result is FileInfo) {
          final file = result.file;
          final bytes = await file.readAsBytes();
          final decoded = await decode(bytes);
          yield decoded;
        }
      }

@lwj1994 lwj1994 force-pushed the develop branch 2 times, most recently from 7fbf8ef to 3de8c60 Compare May 30, 2024 08:03
@lwj1994 lwj1994 changed the title Update MultiFrameImageStreamCompleter (fix decode image crash) User flutter MultiFrameImageStreamCompleter May 30, 2024
@martijn00 martijn00 force-pushed the develop branch 2 times, most recently from 0d48bec to 8d8ff6f Compare July 31, 2024 17:23
@martijn00
Copy link
Member

@lwj1994 Can you provide more info on this and rebase and fix issues?

@lwj1994
Copy link
Author

lwj1994 commented Aug 1, 2024

Can you provide more info on this and rebase and fix issues?

@martijn00 hi.
The basic information is as described above. I received feedback from online users about the app crashing. The app crashes after scrolling for a while in a dual-column image list. This branch has been live for a month now and has been stable with no crash until now.

@lwj1994 lwj1994 changed the title User flutter MultiFrameImageStreamCompleter Use flutter MultiFrameImageStreamCompleter Aug 1, 2024
@lwj1994 lwj1994 changed the title Use flutter MultiFrameImageStreamCompleter Remove ImageStreamCompleter Aug 22, 2024
@lwj1994 lwj1994 changed the title Remove ImageStreamCompleter Remove custom ImageStreamCompleter Aug 22, 2024
@lwj1994 lwj1994 changed the title Remove custom ImageStreamCompleter Replace custom ImageStreamCompleter Aug 22, 2024
@lwj1994 lwj1994 changed the title Replace custom ImageStreamCompleter Replace custom ImageStreamCompleter with flutter.framework. ImageCompleter Aug 22, 2024
@lwj1994 lwj1994 changed the title Replace custom ImageStreamCompleter with flutter.framework. ImageCompleter Replace customful MultiImageStreamCompleter with flutter/foundation/MultiFrameImageStreamCompleter Aug 22, 2024
@lwj1994 lwj1994 changed the title Replace customful MultiImageStreamCompleter with flutter/foundation/MultiFrameImageStreamCompleter Replace custom MultiImageStreamCompleter with flutter/foundation/MultiFrameImageStreamCompleter Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crashed on ios old device (low memory?)
2 participants