优化
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user