feat(review): request a store review after a 3-star win, once
Adds an in-app review prompt gated by ReviewPromptPolicy: only after a 3-star stage win, once the player has cleared >=5 stages, at most once ever (persisted reviewRequested flag). ReviewService swallows all failures and only burns the one-shot when the store actually shows the sheet, so an unavailable store retries on a later win. StoreReviewer wraps in_app_review behind a Reviewer seam so unit tests skip platform channels. 13 new tests; full suite 194 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -175,6 +175,12 @@ class _GameScreenState extends ConsumerState<GameScreen>
|
||||
movesUsed: next.moveLimit - next.movesLeft,
|
||||
);
|
||||
}
|
||||
// recordWin (above) has already updated progress synchronously, so
|
||||
// the policy's cleared-stage count includes this win. Fire-and-forget
|
||||
// — a review prompt must never block the result card.
|
||||
ref
|
||||
.read(reviewServiceProvider)
|
||||
.maybeRequestAfterWin(stars: next.starsEarned);
|
||||
}
|
||||
final stackBox =
|
||||
_stackKey.currentContext?.findRenderObject() as RenderBox?;
|
||||
|
||||
Reference in New Issue
Block a user