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

bug: Interactive Viewer renders grey text when passed alignment

Abierto Apto para principiantes
#6,744 0 comentarios 0 reacciones 1 asignado Ver en GitHub

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
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
dart, flutter, python
Área
frontend

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

bug
Duplicate Check
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
  1. Run the sample.
  2. Observe that the InteractiveViewer is blank and the red text is not rendered.
  3. Remove this line:

alignment=ft.Alignment(0, 0),

  1. Run the sample again.
  2. 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 Image
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

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 flet-dev/flet

Todos los issues de flet-dev/flet

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.