mangayomi-mirror/lib/modules/calendar/widgets/calendar_indicator.dart
Moustapha Kodjo Amadou 95a55d5f81 feat: Implement upcoming manga calendar feature
- Added UpcomingUIModel for managing upcoming manga list items with headers and items.
- Introduced CalendarDay widget to display individual days with event indicators.
- Created CalendarHeader widget for navigating between months.
- Developed CalendarIndicator for visualizing events on specific days.
- Implemented UpcomingCalendar to manage the calendar view and event loading.
- Added UpcomingItem widget for displaying individual upcoming manga with cover images.
- Introduced FetchInterval utility to calculate fetch intervals based on chapter upload dates.
- Refactored updateMangaDetail to utilize FetchInterval for smart update days.
- Enhanced MedianExtension to ensure correct median calculation.
- Removed unused imports and commented-out code for cleaner implementation.
2026-03-05 12:05:29 +01:00

30 lines
718 B
Dart

import 'package:flutter/material.dart';
const _indicatorScale = 12;
const _indicatorAlphaMultiplier = 0.3;
class CalendarIndicator extends StatelessWidget {
final int index;
final double size;
final Color color;
const CalendarIndicator({
required this.index,
required this.size,
required this.color,
super.key,
});
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 1),
width: size / _indicatorScale,
height: size / _indicatorScale,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: color.withValues(alpha: (index + 1) * _indicatorAlphaMultiplier),
),
);
}
}