fix: guard journey map against an empty season list

Prevents StateError when data builder is called with empty list
by displaying loading indicator instead of passing empty list to
activeSeason(), matching title screen behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 13:31:22 +09:00
parent 4fa5564975
commit 6d2d97bfcc
+3 -1
View File
@@ -21,7 +21,9 @@ class SeasonMapScreen extends ConsumerWidget {
loading: () =>
const Scaffold(body: Center(child: CircularProgressIndicator())),
error: (e, _) => Scaffold(body: Center(child: Text('$e'))),
data: (list) => _JourneyMap(pack: activeSeason(list)),
data: (list) => list.isEmpty
? const Scaffold(body: Center(child: CircularProgressIndicator()))
: _JourneyMap(pack: activeSeason(list)),
);
}
}