feat: serpentine journey map with auto-scroll and glowing current node

Replaces the plain GridView with a Candy-Crush-style journey map:
dotted serpentine path, circular nodes (gold=done, glowing=current,
dark+lock=locked), glass header, auto-scroll to current stage.
Updates season_map_screen_test to use Key('stage_node_$i') finders.
This commit is contained in:
2026-06-11 23:17:41 +09:00
parent 96304cc8a7
commit 78eb5c0639
2 changed files with 265 additions and 97 deletions
+20 -5
View File
@@ -71,13 +71,28 @@ void main() {
);
await tester.pumpAndSettle();
// Total stars displayed in header.
expect(find.text('★ 2/9'), findsOneWidget);
expect(find.byIcon(Icons.lock), findsOneWidget); // stage 3 locked
expect(find.text('1'), findsOneWidget);
expect(find.text('2'), findsOneWidget);
// Stage 1 is starred, so stage 2 is unlocked and playable.
await tester.tap(find.text('2'));
// Node 0 (stage 1) exists.
expect(find.byKey(const Key('stage_node_0')), findsOneWidget);
// Stage 3 (index 2) is locked — contains a lock icon.
expect(
find.descendant(
of: find.byKey(const Key('stage_node_2')),
matching: find.byIcon(Icons.lock),
),
findsOneWidget,
);
// Stage 1 is starred, so stage 2 (index 1) is unlocked and playable.
// Ensure the node is visible before tapping.
await tester.ensureVisible(find.byKey(const Key('stage_node_1')));
await tester.tap(
find.byKey(const Key('stage_node_1')),
warnIfMissed: false,
);
await tester.pumpAndSettle();
expect(find.byType(GameScreen), findsOneWidget);