Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#4,001 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@ananya-kaul y travaille déjà.

Depuis le 14/10/2026.

  • #4003 par @ananya-kaul — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
flutter, ios
Domaine
mobile, performance

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Dart
Étoiles
1.9k
Forks
1.3k
Merge moyen
8 h 43 min
PR mergées (30 j)
13

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de fluttercommunity/plus_plugins

Toutes les issues de fluttercommunity/plus_plugins

Issues similaires

Plus d'issues Dart

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.