@@ -334,7 +334,13 @@ final class PersonalTimetableCalendarView extends HookConsumerWidget {
334334 child: TextButton (
335335 style: TextButton .styleFrom (
336336 padding: const EdgeInsets .symmetric (vertical: 10 , horizontal: 16 ),
337- backgroundColor: SemanticColor .light.backgroundSecondary,
337+ backgroundColor: switch (item? .lectureStatus) {
338+ LectureStatus .cancelled => SemanticColor .light.accentError.withValues (alpha: 0.1 ),
339+ LectureStatus .madeUp => SemanticColor .light.accentWarning.withValues (alpha: 0.1 ),
340+ LectureStatus .roomChanged => SemanticColor .light.accentInfo.withValues (alpha: 0.1 ),
341+ LectureStatus .normal => SemanticColor .light.backgroundSecondary,
342+ null => SemanticColor .light.backgroundSecondary,
343+ },
338344 disabledBackgroundColor: SemanticColor .light.backgroundTertiary,
339345 overlayColor: SemanticColor .light.accentPrimary,
340346 side: BorderSide (color: SemanticColor .light.borderPrimary),
@@ -357,7 +363,26 @@ final class PersonalTimetableCalendarView extends HookConsumerWidget {
357363 style: Theme .of (context).textTheme.bodyLarge? .copyWith (color: SemanticColor .light.labelPrimary),
358364 ),
359365 ),
360- if (item != null ) _lectureStatusLabel (item.lectureStatus),
366+ if (item != null )
367+ switch (item.lectureStatus) {
368+ LectureStatus .cancelled => Text (
369+ '休講' ,
370+ style: Theme .of (
371+ context,
372+ ).textTheme.labelMedium? .copyWith (color: SemanticColor .light.accentError),
373+ ),
374+ LectureStatus .madeUp => Text (
375+ '補講' ,
376+ style: Theme .of (
377+ context,
378+ ).textTheme.labelMedium? .copyWith (color: SemanticColor .light.accentWarning),
379+ ),
380+ LectureStatus .roomChanged => Text (
381+ '教室変更' ,
382+ style: Theme .of (context).textTheme.labelMedium? .copyWith (color: SemanticColor .light.accentInfo),
383+ ),
384+ LectureStatus .normal => const SizedBox .shrink (),
385+ },
361386 ],
362387 ),
363388 ),
@@ -372,26 +397,6 @@ final class PersonalTimetableCalendarView extends HookConsumerWidget {
372397 );
373398 }
374399
375- Widget _lectureStatusLabel (LectureStatus status) {
376- return switch (status) {
377- LectureStatus .cancelled => Row (
378- spacing: 2 ,
379- children: [
380- Icon (Icons .cancel_outlined, size: 16 , color: SemanticColor .light.accentError),
381- Text ('休講' , style: TextStyle (color: SemanticColor .light.accentError)),
382- ],
383- ),
384- LectureStatus .madeUp => Row (
385- spacing: 2 ,
386- children: [
387- Icon (Icons .info_outline, size: 16 , color: SemanticColor .light.accentWarning),
388- Text ('補講' , style: TextStyle (color: SemanticColor .light.accentWarning)),
389- ],
390- ),
391- LectureStatus .normal => const SizedBox .shrink (),
392- };
393- }
394-
395400 bool _isSameDate (DateTime a, DateTime b) {
396401 return a.year == b.year && a.month == b.month && a.day == b.day;
397402 }
0 commit comments