part of '../lesson_flow.dart'; class _PreviewStep extends StatelessWidget { const _PreviewStep({ required this.state, required this.item, required this.position, required this.total, required this.onLookup, required this.onNext, required this.onSkip, }); final VocabularyItem item; final AppState state; final int position; final int total; final VoidCallback onLookup; final VoidCallback onNext; final VoidCallback onSkip; @override Widget build(BuildContext context) => _LessonScaffold( step: 1, child: SpacedColumn( children: [ Eyebrow('先认识今天的词 · $position / $total'), Text('后面会遇到这些词。', style: Theme.of(context).textTheme.headlineMedium), const Text('先听一遍、知道意思就够了,不用马上背会。'), SectionCard( tint: AppColors.softGreen, child: SpacedColumn( children: [ Text( item.word, style: const TextStyle( fontSize: 28, fontWeight: FontWeight.w600, ), ), if (item.ipa != null) Text(item.ipa!, style: Theme.of(context).textTheme.bodyMedium), Text(item.meaning, style: const TextStyle(fontSize: 17)), _AudioRow(label: '播放示范音', speech: item.word), LexiconText(item.example, state: state), Text(item.exampleMeaning), ], ), ), Wrap( spacing: 8, children: [ActionChip(label: const Text('查词'), onPressed: onLookup)], ), PrimaryButton( label: position == total ? '进入课程' : '认识了,下一个', onPressed: onNext, ), TextButton(onPressed: onSkip, child: const Text('跳过,直接进入课程')), ], ), ); }