feat: 完善听力口语辅助状态记录、练习分块与复习抽查间隔机制

This commit is contained in:
shen
2026-09-23 18:33:22 -07:00
parent 6b42b7abc3
commit d740a9e19c
106 changed files with 2933 additions and 845 deletions
@@ -179,7 +179,8 @@ class _WordsPageState extends State<WordsPage> {
),
// The sentence is the point of the feedback: a gloss alone is
// what did not stick the first time.
if (WordBank.instance.exampleOf(question.id) case final sample?) ...[
if (WordBank.instance.exampleOf(question.id)
case final sample?) ...[
Text(
sample.en,
style: TextStyle(
@@ -278,7 +279,8 @@ class _WordsPageState extends State<WordsPage> {
tint: AppColors.warm,
child: SpacedColumn(
children: [
for (final id in shaky.take(8)) _WordRow(id: id, state: state),
for (final id in shaky.take(8))
_WordRow(id: id, state: state),
],
),
),
@@ -334,7 +336,10 @@ class _WordRow extends StatelessWidget {
children: [
Text(
wordEnglish(id),
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
Text(
wordIpa(id).isEmpty
@@ -345,14 +350,11 @@ class _WordRow extends StatelessWidget {
],
),
),
Text(
switch (status) {
WordStatus.newWord => '新学',
WordStatus.recognized => '认识',
WordStatus.familiar => '熟悉',
},
style: Theme.of(context).textTheme.bodySmall,
),
Text(switch (status) {
WordStatus.newWord => '新学',
WordStatus.recognized => '认识',
WordStatus.familiar => '熟悉',
}, style: Theme.of(context).textTheme.bodySmall),
IconButton(
icon: const Icon(Icons.volume_up_outlined, size: 20),
onPressed: () => VoiceService.instance.speak(wordEnglish(id)),