Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: share_plus decodes full-resolution images on the main thread when preparing iOS share previews

Đang mở
#4,001 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ananya-kaul đang làm issue này rồi.

Từ ngày 14/10/2026.

  • #4003 của @ananya-kaul — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
flutter, ios
Lĩnh vực
mobile, performance

Hướng nghiên cứu

Start with the iOS side of share_plus and search for every UIImage imageWithContentsOfFile: call, including the placeholder, thumbnail and link-metadata callbacks. Then read the 120 × 120 drawing in the metadata callback that PR #3320 added. Done means preview images are produced without fully decoding and drawing the original on the calling thread, which you can check by sharing a large photo on an iOS device and watching for main-thread stalls.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Plugin: share_plus 13.3.1
Current stable releases: Flutter 3.47.7 and iOS 27.0.1. These are current-release references; the original report’s exact OS and Flutter versions haven’t been confirmed.

Sharing a high-resolution photo can stall the app while the share sheet prepares its preview. We encountered this with a 48 MP image; the hang trace pointed to synchronous image drawing in the share metadata callback.

The placeholder, thumbnail, and link-metadata callbacks load the original image using UIImage imageWithContentsOfFile:. The metadata callback then draws it into a 120 × 120 context. This limits the resulting preview size, but still requires decoding and drawing the full-resolution source on the calling thread.

PR #3320, which addressed #3322, added that resize. The same implementation remains in 13.3.1 and current main.

Proposed solution

One possible approach is to generate small previews with ImageIO downsampling on a background queue. This could avoid decoding and resizing the full-resolution image inside UIKit’s preview callbacks.

Ngôn ngữ chính
Dart
Star
1.9k
Fork
1.3k
Merge trung bình
8 giờ 43 phút
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fluttercommunity/plus_plugins

Tất cả issue của fluttercommunity/plus_plugins

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.