refactor: 重构提醒通知系统
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user