bug: Interactive Viewer renders grey text when passed alignment
Los mantenedores suelen responder en 1 día
@ndonkoHenri ya está trabajando en esto.
Desde el 24/9/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Comienza en la implementación del control Flutter InteractiveViewer, donde se lee la propiedad alignment de widget.control, y compara la ruta getAlignment("alignment") propuesta con el manejo de valores existente. Ejecuta la reproducción de Python proporcionada con y sin alignment y, a continuación, verifica que los hijos de texto e imagen se rendericen respetando la alignment proporcionada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Duplicate Check
- I have searched the opened issues and there are no duplicates
Describe the bug
ft.InteractiveViewer fails to render its content when its alignment property is set to an ft.Alignment value.
The page or containing surface remains blank. Removing only the alignment argument makes the same child render correctly.
This affects images and simple controls such as ft.Text, so it is not related to image loading, paths, sizing, constrained, or boundary margins.
Code sample
Code
import flet as ft
def main(page: ft.Page):
page.add(
ft.InteractiveViewer(
content=ft.Text(
"InteractiveViewer child",
size=40,
color=ft.Colors.RED,
),
width=900,
height=650,
alignment=ft.Alignment(0, 0),
)
)
ft.run(main)
To reproduce
- Run the sample.
- Observe that the InteractiveViewer is blank and the red text is not rendered.
- Remove this line:
alignment=ft.Alignment(0, 0),
- Run the sample again.
- The red text now renders correctly.
The same behavior occurs with an ft.Image child.
Expected behavior
Setting InteractiveViewer.alignment should position the child using the supplied alignment without preventing the control from rendering.
Screenshots / Videos
Captures
Operating System
Linux
Operating system details
Arch Linux, kernel 7.1.5-arch1-2, x86_64
Flet version
Flet 0.86.4 (Python 3.11.15)
Regression
No, it isn't
Suggestions
import '../extensions/control.dart';
+import '../utils/alignment.dart';
...
- alignment: widget.control.get("alignment"),
- alignment: widget.control.getAlignment("alignment"),
Serialize alignment with getAlignment function before passing into the interactive viewer.
Logs
Logs
No Python-side exception is reported. The control simply fails to render in the Flutter client.
Additional details
The issue was isolated by testing the properties independently:
- Plain ft.Image: renders.
- InteractiveViewer without alignment: renders.
- InteractiveViewer with constrained=True: renders.
- InteractiveViewer with constrained=False: renders.
- Adding alignment=ft.Alignment(0, 0): child disappears.
- Removing only alignment: child renders again.
- Lenguaje dominante
- Python
- Estrellas
- 17.1k
- Forks
- 708
- Merge medio
- 1 d 17 h
- PR fusionados (30 d)
- 46
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de flet-dev/flet
-
bug controls
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
feature: Dropdown on_click eventAbiertofeature request
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
Los mantenedores suelen responder en 1 día
Todos los issues de flet-dev/flet
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
kornia/kornia#5263 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Metadata correction for W16-5400Abiertoapproved correction metadata
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
acl-org/acl-anthology#10133 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
BasedHardware/omi#20084 ·
Los mantenedores suelen responder en 1 día
-
bug needs-acceptance wg/evaluation-quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
vllm-project/semantic-router#4424 ·
Los mantenedores suelen responder en 1 día