feat: 静态页面开发完成

This commit is contained in:
2026-05-21 14:09:46 +08:00
parent 8156e8efbf
commit 763aef6bb9
73 changed files with 6345 additions and 1370 deletions

View File

@@ -4,6 +4,7 @@ import 'package:flutter_animate/flutter_animate.dart';
import '../providers/event_provider.dart';
import '../theme.dart';
import '../l10n/app_localizations.dart';
import '../widgets/skeleton.dart';
class EventListPage extends ConsumerStatefulWidget {
const EventListPage({super.key});
@@ -62,7 +63,10 @@ class _EventListPageState extends ConsumerState<EventListPage> {
title: Text(l10n.eventRecords),
),
body: eventState.isLoading
? const Center(child: CircularProgressIndicator())
? SkeletonList(
count: 5,
itemBuilder: (_) => const EventCardSkeleton(),
)
: eventState.events.isEmpty
? _buildEmptyState(l10n)
: ListView.builder(
@@ -89,7 +93,7 @@ class _EventListPageState extends ConsumerState<EventListPage> {
const SizedBox(height: 16),
Text(
l10n.noEvents,
style: const TextStyle(fontSize: 16, color: AppColors.textSecondary),
style: TextStyle(fontSize: 16, color: AppColors.textSecondary),
),
],
),
@@ -137,7 +141,7 @@ class _EventListPageState extends ConsumerState<EventListPage> {
Expanded(
child: Text(
event.entityName,
style: const TextStyle(
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
@@ -166,7 +170,7 @@ class _EventListPageState extends ConsumerState<EventListPage> {
event.description,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
style: TextStyle(
fontSize: 14,
color: AppColors.textSecondary,
height: 1.4,
@@ -187,7 +191,7 @@ class _EventListPageState extends ConsumerState<EventListPage> {
const SizedBox(width: 4),
Text(
'${l10n.publishTime}: ${_formatDate(event.publishTime)}',
style: const TextStyle(fontSize: 12, color: AppColors.textTertiary),
style: TextStyle(fontSize: 12, color: AppColors.textTertiary),
),
if (event.popupReminder) ...[
const SizedBox(width: 12),
@@ -197,7 +201,7 @@ class _EventListPageState extends ConsumerState<EventListPage> {
if (event.creatorName != null)
Text(
event.creatorName!,
style: const TextStyle(fontSize: 12, color: AppColors.textTertiary),
style: TextStyle(fontSize: 12, color: AppColors.textTertiary),
),
],
),