diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index 213abe6..9ecdd12 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -460,15 +460,15 @@ void main() async { expect(find.byType(Badge), findsNothing); expect(find.byKey(const Key('target-day')), findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('target-day'))) as Divider) - .color, - Colors.green); await tester.scrollUntilVisible(find.byKey(const Key('current-day')), 50.0); await tester.pumpAndSettle(); expect(find.byKey(const Key('current-day')), findsOneWidget); + expect( + (tester.firstWidget(find.byKey(const Key('current-day'))) as Divider) + .color, + Colors.green); await tester.scrollUntilVisible(find.byKey(const Key('day-81')), -50.0); await tester.pumpAndSettle(); @@ -498,10 +498,10 @@ void main() async { expect((tester.firstWidget(find.byType(Badge)) as Badge).backgroundColor, Colors.red); expect(find.byType(Divider), findsNWidgets(2)); - expect(find.byKey(const Key('current-day')), findsOneWidget); expect(find.byKey(const Key('target-day')), findsOneWidget); + expect(find.byKey(const Key('current-day')), findsOneWidget); expect( - (tester.firstWidget(find.byKey(const Key('target-day'))) as Divider) + (tester.firstWidget(find.byKey(const Key('current-day'))) as Divider) .color, Colors.red); @@ -523,9 +523,11 @@ void main() async { '1'); expect((tester.firstWidget(find.byType(Badge)) as Badge).backgroundColor, Colors.green); + Future.delayed(Duration(seconds: 10)); expect(find.byKey(const Key('target-day')), findsOneWidget); + expect(find.byKey(const Key('current-day')), findsOneWidget); expect( - (tester.firstWidget(find.byKey(const Key('target-day'))) as Divider) + (tester.firstWidget(find.byKey(const Key('current-day'))) as Divider) .color, Colors.green); diff --git a/lib/src/schedules/presentations/schedule_page.dart b/lib/src/schedules/presentations/schedule_page.dart index db5eeea..369ab8f 100644 --- a/lib/src/schedules/presentations/schedule_page.dart +++ b/lib/src/schedules/presentations/schedule_page.dart @@ -52,7 +52,7 @@ class _SchedulePageState extends ConsumerState { final isCurrentDay = plan.bookmark.dayIndex == index; final isTargetDay = todayTargetIndex == index; final dividerColor = - isCurrentDay ? Theme.of(context).colorScheme.primary : badgeColor; + isCurrentDay ? badgeColor : Theme.of(context).colorScheme.primary; final remainingDays = planNotifier .getRemainingDays(Bookmark(dayIndex: index, sectionIndex: 0)); final date = plan.withTargetDate && remainingDays != null