mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-05-11 12:30:49 +00:00
- 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.
30 lines
718 B
Dart
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),
|
|
),
|
|
);
|
|
}
|
|
}
|