fix(app): publish hud every frame and verify rewarded ads on device

This commit is contained in:
2026-10-25 00:32:28 +02:00
parent f91eeba525
commit 5ab02ec2df
2 changed files with 8 additions and 2 deletions
+5 -2
View File
@@ -113,7 +113,8 @@ class IronArcGame extends FlameGame {
@override
Future<void> onLoad() async {
_match = matchFactory?.call() ?? NativeMatch(seed);
_pushHud();
// Do not publish here: notifying listeners during the first build is lost.
// The first update() call publishes the loaded state on the next frame.
}
@override
@@ -135,7 +136,6 @@ class IronArcGame extends FlameGame {
_accumulator -= step;
steps++;
}
_pushHud();
} else if (_match.isAiming) {
_accumulator = 0;
}
@@ -155,6 +155,9 @@ class IronArcGame extends FlameGame {
}
}
_wasFlying = flying;
// Publish every frame: the notifier only fires on real changes, and this
// guarantees the first painted frame already shows the loaded match state.
_pushHud();
_updateCamera(dt);
}