Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#4,001 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@ananya-kaul ya está trabajando en esto.

Desde el 14/10/2026.

  • #4003 de @ananya-kaul — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
flutter, ios

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Dart
Estrellas
1.9k
Forks
1.3k
Merge medio
8 h 43 min
PR fusionados (30 d)
13

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fluttercommunity/plus_plugins

Todos los issues de fluttercommunity/plus_plugins

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.