This commit is contained in:
ytc1012
2025-12-02 16:38:58 +08:00
parent ef44d11c32
commit 86a368e1e3
34 changed files with 2767 additions and 686 deletions

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import '../l10n/app_localizations.dart';
import '../theme/app_colors.dart';
import '../theme/app_constants.dart';
import '../services/storage_service.dart';
import '../services/points_service.dart';
import '../services/achievement_service.dart';
@@ -418,14 +419,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
const SizedBox(height: 16),
// Calendar grid (last 28 days)
_buildCalendarGrid(),
_buildCalendarGrid(l10n),
],
),
);
}
/// Build calendar grid showing check-in history
Widget _buildCalendarGrid() {
Widget _buildCalendarGrid(AppLocalizations l10n) {
final now = DateTime.now();
final today = DateTime(now.year, now.month, now.day);
@@ -434,16 +435,24 @@ class _ProfileScreenState extends State<ProfileScreen> {
// Weekday labels
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: ['S', 'M', 'T', 'W', 'T', 'F', 'S']
children: [
l10n.weekdayS,
l10n.weekdayM,
l10n.weekdayT,
l10n.weekdayW,
l10n.weekdayTh,
l10n.weekdayF,
l10n.weekdaySa,
]
.map(
(day) => SizedBox(
width: 40,
width: ProfileConstants.calendarCellSize,
child: Center(
child: Text(
day,
style: const TextStyle(
style: TextStyle(
fontFamily: 'Nunito',
fontSize: 12,
fontSize: FontSizes.caption,
fontWeight: FontWeight.w600,
color: AppColors.textSecondary,
),