feat: 实现起卦、设置与积分系统

This commit is contained in:
qzl
2026-04-03 16:56:47 +08:00
parent 31594558eb
commit f245eec5f6
170 changed files with 20728 additions and 328 deletions
@@ -0,0 +1,58 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import '../../../../shared/theme/design_tokens.dart';
import '../../../../shared/widgets/app_loading_indicator.dart';
class LegalDocumentScreen extends StatelessWidget {
const LegalDocumentScreen({
super.key,
required this.title,
required this.assetPath,
});
final String title;
final String assetPath;
@override
Widget build(BuildContext context) {
final colors = Theme.of(context).colorScheme;
return Scaffold(
backgroundColor: colors.surfaceContainerLow,
appBar: AppBar(
title: Text(title),
centerTitle: true,
backgroundColor: colors.surfaceContainerLow,
surfaceTintColor: colors.surfaceContainerLow,
),
body: FutureBuilder<String>(
future: rootBundle.loadString(assetPath),
builder: (context, snapshot) {
if (!snapshot.hasData) {
return const Center(
child: AppLoadingIndicator(variant: AppLoadingVariant.surface),
);
}
return Markdown(
data: snapshot.data!,
padding: const EdgeInsets.all(AppSpacing.lg),
styleSheet: MarkdownStyleSheet.fromTheme(Theme.of(context))
.copyWith(
p: Theme.of(
context,
).textTheme.bodyMedium?.copyWith(height: 1.7),
h1: Theme.of(context).textTheme.titleLarge,
h2: Theme.of(context).textTheme.titleMedium,
h3: Theme.of(
context,
).textTheme.titleMedium?.copyWith(color: colors.primary),
blockSpacing: AppSpacing.lg,
),
);
},
),
);
}
}