feat: 完善听力口语辅助状态记录、练习分块与复习抽查间隔机制
This commit is contained in:
@@ -37,7 +37,8 @@ class UsageCard extends StatelessWidget {
|
||||
if (usage == null) return const SizedBox.shrink();
|
||||
final lines = <({String label, String text})>[
|
||||
if (usage.when.isNotEmpty) (label: '什么时候用', text: usage.when),
|
||||
if (!compact && usage.reply.isNotEmpty) (label: '对方会怎么答', text: usage.reply),
|
||||
if (!compact && usage.reply.isNotEmpty)
|
||||
(label: '对方会怎么答', text: usage.reply),
|
||||
if (!compact && usage.swap.isNotEmpty) (label: '换个说法', text: usage.swap),
|
||||
// Mid-exercise only the nearest confusion is worth a line; the full
|
||||
// list belongs on the preview and lookup cards.
|
||||
@@ -57,10 +58,9 @@ class UsageCard extends StatelessWidget {
|
||||
for (final line in lines)
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
style: DefaultTextStyle.of(context).style.copyWith(
|
||||
color: AppColors.warmInk,
|
||||
height: 1.45,
|
||||
),
|
||||
style: DefaultTextStyle.of(
|
||||
context,
|
||||
).style.copyWith(color: AppColors.warmInk, height: 1.45),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '${line.label}:',
|
||||
@@ -94,7 +94,10 @@ class SegmentUsage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ids = findLessonSegment(segmentId)?.targetItemIds ?? const <String>[];
|
||||
final explained = [for (final id in ids) if (coreUsage(id) != null) id];
|
||||
final explained = [
|
||||
for (final id in ids)
|
||||
if (coreUsage(id) != null) id,
|
||||
];
|
||||
if (explained.isEmpty) return const SizedBox.shrink();
|
||||
return SpacedColumn(
|
||||
spacing: 8,
|
||||
|
||||
Reference in New Issue
Block a user