feat: A1 短材料复现本单元理解词,并加入黑夜模式

课程内容
- 重写全部 21 个 A1 单元的听读材料,把本单元理解词织进听/读文本,
  单元内理解词复现率从约 20% 提升到约 77%(各单元 56–96%)。
- 修正 U01 房间号与机场大巴同为 thirty 的撞车(改为 17/30/40)。
- 校验器容差按级别读取(A1 为 8%),materials 覆盖率、字数、
  选项子串等校验全部通过;course_content_test 通过。

黑夜模式
- app_theme 拆分明/暗两套调色板,AppColors 随亮度切换;
  main 用 theme/darkTheme/themeMode + builder 镜像已解析亮度;
  主题偏好持久化到快照;进度页新增“外观主题”切换。

文档
- COURSE-PACK-JSON.md 更新 A1 词池覆盖(840/933)与材料复现约定。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-18 11:16:09 +09:00
co-authored by Claude Opus 4.8
parent 9ab08c25ef
commit febfd30f49
93 changed files with 72676 additions and 274 deletions
+2 -2
View File
@@ -120,7 +120,7 @@ class SecondaryButton extends StatelessWidget {
onPressed: onPressed,
style: OutlinedButton.styleFrom(
foregroundColor: AppColors.ink,
side: const BorderSide(color: AppColors.line),
side: BorderSide(color: AppColors.line),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(14),
),
@@ -139,7 +139,7 @@ class Eyebrow extends StatelessWidget {
@override
Widget build(BuildContext context) => Text(
text,
style: const TextStyle(
style: TextStyle(
color: AppColors.green,
fontWeight: FontWeight.w600,
fontSize: 13,
+14 -14
View File
@@ -165,7 +165,7 @@ class _LexiconTextState extends State<LexiconText> {
TextSpan(
text: matched,
recognizer: recognizer,
style: const TextStyle(
style: TextStyle(
color: AppColors.green,
decoration: TextDecoration.underline,
decorationColor: AppColors.green,
@@ -401,7 +401,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
child: SpacedColumn(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Row(
Row(
children: [
Icon(Icons.translate, size: 16, color: AppColors.green),
SizedBox(width: 6),
@@ -464,7 +464,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
if (analysis.pronunciationTips != null &&
analysis.pronunciationTips!.isNotEmpty) ...[
const SizedBox(height: 6),
const Row(
Row(
children: [
Icon(
Icons.record_voice_over_outlined,
@@ -522,7 +522,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
const SizedBox(height: 4),
Row(
children: [
const Icon(
Icon(
Icons.auto_stories_outlined,
size: 18,
color: AppColors.green,
@@ -560,7 +560,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
if (phrase.ipa != null && phrase.ipa!.isNotEmpty)
Text(
phrase.ipa!,
style: const TextStyle(
style: TextStyle(
fontSize: 13,
color: AppColors.muted,
),
@@ -575,7 +575,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
),
const SizedBox(width: 4),
_addedToReview.contains(phrase.phrase.toLowerCase())
? const Chip(
? Chip(
label: Text('已在复习', style: TextStyle(fontSize: 12)),
avatar: Icon(Icons.check, size: 14, color: AppColors.green),
padding: EdgeInsets.zero,
@@ -602,7 +602,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
if (phrase.usageNote != null && phrase.usageNote!.isNotEmpty)
Text(
'用法:${phrase.usageNote}',
style: const TextStyle(
style: TextStyle(
fontSize: 12,
color: AppColors.muted,
),
@@ -618,7 +618,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
children: [
Text(
'解析引擎:${analysis.provider} · 本机已缓存',
style: const TextStyle(fontSize: 12, color: AppColors.muted),
style: TextStyle(fontSize: 12, color: AppColors.muted),
),
TextButton.icon(
onPressed: requestingSentenceAnalysis ? null : _requestSentenceAnalysis,
@@ -666,7 +666,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
color: AppColors.softGreen,
borderRadius: BorderRadius.circular(10),
),
child: const Text(
child: Text(
'已解析',
style: TextStyle(
fontSize: 11,
@@ -769,7 +769,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
const SizedBox(height: 4),
Row(
children: [
const Icon(Icons.layers_outlined, size: 18, color: AppColors.green),
Icon(Icons.layers_outlined, size: 18, color: AppColors.green),
const SizedBox(width: 6),
Text(
'本地词典匹配到的短语 (${localPhrases.length})',
@@ -804,7 +804,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
),
const SizedBox(width: 4),
_addedToReview.contains(phraseItem.word.toLowerCase())
? const Icon(Icons.check, size: 18, color: AppColors.green)
? Icon(Icons.check, size: 18, color: AppColors.green)
: OutlinedButton(
style: OutlinedButton.styleFrom(
visualDensity: VisualDensity.compact,
@@ -823,7 +823,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
if (phraseItem.example.isNotEmpty)
Text(
'例:${phraseItem.example} (${phraseItem.exampleMeaning})',
style: const TextStyle(
style: TextStyle(
fontSize: 12,
color: AppColors.muted,
),
@@ -865,7 +865,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
if (sentenceAnalysisError != null)
Text(
sentenceAnalysisError!,
style: const TextStyle(color: AppColors.warmInk),
style: TextStyle(color: AppColors.warmInk),
),
],
),
@@ -888,7 +888,7 @@ class _LexiconLookupSheetState extends State<_LexiconLookupSheet> {
if (temporaryError != null)
Text(
temporaryError!,
style: const TextStyle(color: AppColors.warmInk),
style: TextStyle(color: AppColors.warmInk),
),
if (temporaryDefinition != null)