feat(analytics): booster + daily-reward events

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-18 12:24:02 +09:00
parent fa4247cd9b
commit d0a2be15ba
4 changed files with 40 additions and 0 deletions
+8
View File
@@ -30,6 +30,14 @@ class DailyRewardNotifier extends Notifier<DailyResolution> {
await inv.grant(entry.key, entry.value * (doubled ? 2 : 1));
}
await _save.recordDailyClaim(_cal.ymd(_now()), r.day);
ref.read(analyticsProvider).dailyRewardClaimed(day: r.day, doubled: doubled);
for (final e in reward.entries) {
ref.read(analyticsProvider).boosterGranted(
type: e.key.name,
count: e.value * (doubled ? 2 : 1),
source: 'daily',
);
}
state = _resolve();
}
}
+1
View File
@@ -151,6 +151,7 @@ class GameSessionNotifier extends Notifier<GameViewState?> {
}
if (!apply()) return BoosterUseResult.invalidTarget;
await inv.consume(type);
ref.read(analyticsProvider).boosterUsed(type: type.name);
_publish(lastPlacement: null);
return BoosterUseResult.success;
}