Skip to content

fix: horario bug - stateState duplicated during build#56

Merged
Im-Fran merged 4 commits intodevfrom
xsilvamo/fix/bug-horario-setstate
Mar 30, 2026
Merged

fix: horario bug - stateState duplicated during build#56
Im-Fran merged 4 commits intodevfrom
xsilvamo/fix/bug-horario-setstate

Conversation

@xsilvamo
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Este PR aborda un bug en la pantalla de Horario causado por ejecutar inicialización/lógica durante build, evitando efectos secundarios repetidos y separando la carga de datos del renderizado del contenido.

Changes:

  • Mueve horarioController.init(context) fuera de build hacia initState y reemplaza el FutureBuilder con un Future almacenado en estado.
  • Extrae el Scaffold principal a un widget Stateless (HorarioScreenContent) que recibe el horario ya cargado.
  • Ajusta HorarioController.init para aplicar setZoom y centrar el viewport en un postFrameCallback.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
lib/screens/horario/horario_screen.dart Refactor de carga/render para evitar efectos secundarios en build y separar contenido en widget stateless.
lib/core/services/controllers/horario_controller.dart Diferir setZoom/centrado del viewport al primer frame para evitar problemas durante construcción.

@Im-Fran Im-Fran enabled auto-merge (squash) March 30, 2026 03:08
@Im-Fran Im-Fran merged commit 49ab3ba into dev Mar 30, 2026
4 checks passed
@Im-Fran Im-Fran deleted the xsilvamo/fix/bug-horario-setstate branch March 30, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants