From ee83f952f54af828847b474627d99169640c5757 Mon Sep 17 00:00:00 2001 From: Bearmine Date: Tue, 17 Mar 2026 16:19:37 -0500 Subject: [PATCH] Make day page switchable --- lib/main.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index b1d9fe6..71864d1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -66,7 +66,7 @@ class _MyHomePageState extends State { @override Widget build(BuildContext context) { // Manage days and create items list of a pages. - final days = [AdventOfCodeDays.day1, AdventOfCodeDays.day2]; + final days = AdventOfCodeDays.values; List dayItems = []; for (var day in days) { dayItems.add( @@ -78,7 +78,7 @@ class _MyHomePageState extends State { } var colorScheme = Theme.of(context).colorScheme; - Widget page = DayPage(AdventOfCodeDays.day1); + Widget page = DayPage(days[selectedIndex]); // The container for the current page, with its background color // and subtle switching animation.