73 lines
2.5 KiB
Dart
73 lines
2.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../core/app_state.dart';
|
|
import '../../core/app_theme.dart';
|
|
import '../../widgets/app_widgets.dart';
|
|
import 'profile_widgets.dart';
|
|
|
|
/// 升级进度:A0 出口的三项条件。
|
|
class LevelProgressView extends StatelessWidget {
|
|
const LevelProgressView({super.key, required this.state});
|
|
final AppState state;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => SpacedColumn(
|
|
spacing: 16,
|
|
children: [
|
|
const Eyebrow('A0 → A1'),
|
|
Text(
|
|
state.a0Passed
|
|
? 'A0 已通过'
|
|
: '已完成 ${(state.a0StageProgress * 100).round()}%',
|
|
style: Theme.of(context).textTheme.headlineMedium,
|
|
),
|
|
Text(
|
|
state.a0Passed ? 'A1 主线内容尚未提供,可继续进行 A0 巩固。' : '进度来自掌握证据,不是上完固定课数就升级。',
|
|
),
|
|
MenuGroup(
|
|
children: [
|
|
GoalProgressRow(
|
|
icon: Icons.record_voice_over_outlined,
|
|
title: '可使用',
|
|
note: '核心内容已获得独立使用证据',
|
|
value: state.coreUsableCount,
|
|
goal: a0UsableGoal,
|
|
),
|
|
GoalProgressRow(
|
|
icon: Icons.verified_outlined,
|
|
title: '已掌握(间隔复习)',
|
|
note: '达到四次间隔复习要求',
|
|
value: state.coreMasteredCount,
|
|
goal: a0MasteredGoal,
|
|
),
|
|
GoalProgressRow(
|
|
icon: Icons.assignment_turned_in_outlined,
|
|
title: '两套四技能评估',
|
|
note: '两套不同题组都通过,间隔至少 24 小时',
|
|
value: state.passedAssessmentPackCount,
|
|
goal: 2,
|
|
),
|
|
],
|
|
),
|
|
SectionCard(
|
|
padding: EdgeInsets.zero,
|
|
child: Theme(
|
|
data: Theme.of(context).copyWith(dividerColor: Colors.transparent),
|
|
child: ExpansionTile(
|
|
tilePadding: const EdgeInsets.symmetric(horizontal: 14),
|
|
childrenPadding: const EdgeInsets.fromLTRB(14, 0, 14, 14),
|
|
expandedCrossAxisAlignment: CrossAxisAlignment.start,
|
|
leading: Icon(Icons.info_outline, color: AppColors.muted),
|
|
title: const Text('进入下一阶段的条件'),
|
|
children: const [
|
|
Text(
|
|
'60 项固定核心内容中至少 $a0UsableGoal 项可使用、$a0MasteredGoal 项已掌握,且两套不同题组的听说读写评估都通过并间隔至少 24 小时。',
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|