feat: 重构 Reminder Notification 系统并更新应用包名
This commit is contained in:
@@ -453,7 +453,7 @@ class _CalendarDayWeekScreenState extends State<CalendarDayWeekScreen>
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
_weekdayLabel(date),
|
||||
_weekdayLabel(context, date),
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: isWeekend
|
||||
@@ -492,8 +492,16 @@ class _CalendarDayWeekScreenState extends State<CalendarDayWeekScreen>
|
||||
);
|
||||
}
|
||||
|
||||
String _weekdayLabel(DateTime date) {
|
||||
const labels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
||||
String _weekdayLabel(BuildContext context, DateTime date) {
|
||||
final labels = [
|
||||
context.l10n.calendarMonthWeekdaySunShort,
|
||||
context.l10n.calendarMonthWeekdayMonShort,
|
||||
context.l10n.calendarMonthWeekdayTueShort,
|
||||
context.l10n.calendarMonthWeekdayWedShort,
|
||||
context.l10n.calendarMonthWeekdayThuShort,
|
||||
context.l10n.calendarMonthWeekdayFriShort,
|
||||
context.l10n.calendarMonthWeekdaySatShort,
|
||||
];
|
||||
return labels[date.weekday % 7];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user