refactor: 重构提醒通知系统

This commit is contained in:
zl-q
2026-04-01 00:42:34 +08:00
parent 9a231dae9e
commit 6722f3d74b
21 changed files with 375 additions and 171 deletions
@@ -9,6 +9,7 @@ class DayTimelineMetrics {
static const double timeLabelGap = 8;
static const double eventRightInset = 4;
static const double eventColumnGap = 4;
static const double minEventCardWidth = 30;
static double timelineHeight(DayViewScale scale) {
return scale.pixelsForMinutes(minutesInDay);
@@ -20,10 +21,10 @@ class DayTimelineMetrics {
static double eventAreaWidth(double boardWidth) {
final width = boardWidth - eventAreaLeft() - eventRightInset;
return width > 0 ? width : 0;
return width < 0 ? 0 : width;
}
static int clampMinuteOfDay(int minute) {
return minute.clamp(0, minutesInDay).toInt();
return minute.clamp(0, minutesInDay);
}
}