SIGN IN SIGN UP

fix: Make `buildContext` available during `onLoad` and `onMount` (#3833)

The `RenderGameWidget` (which provides `buildContext` via
`GameRenderBox`) was only rendered inside a `FutureBuilder` after
`loaderFuture` completed. Components mounting during `loaderFuture` (in
`game.load()`, `game.mount()`, `game.update(0)`) would find
`buildContext` to be null.

Add `widgetBuildContext` to `Game` set early by `GameWidgetState` from
the `LayoutBuilder` context, so `buildContext` is available before the
render box is attached. Update `isAttached` to check `_gameRenderBox`
directly to avoid breaking coordinate conversion methods.
L
Lukas Klingsbo committed
60bfcb30e7751ee65caa6425d79bbd7bb82ae3ed
Parent: 5e13f69
Committed by GitHub <noreply@github.com> on 3/2/2026, 8:27:06 PM