import 'package:flutter/material.dart'; import '../../core/app_state.dart'; import '../../core/app_theme.dart'; import '../../widgets/app_widgets.dart'; import 'lesson_path.dart'; import 'today_task_card.dart'; /// 学习 tab:今天的任务在上,完整课程路径在下。 class HomePage extends StatelessWidget { const HomePage({ super.key, required this.state, required this.onStartLesson, required this.onOpenLesson, required this.onStartReview, required this.onResumeLessonDialogue, required this.onStartReinforcement, required this.onOpenAssessment, }); final AppState state; final VoidCallback onStartLesson; final ValueChanged onOpenLesson; final VoidCallback onStartReview; final VoidCallback onResumeLessonDialogue; final VoidCallback onStartReinforcement; final ValueChanged onOpenAssessment; @override Widget build(BuildContext context) => AppPage( child: SpacedColumn( spacing: 16, children: [ Text('学习', style: Theme.of(context).textTheme.headlineMedium), TodayTaskCard( state: state, onStartLesson: onStartLesson, onStartReview: onStartReview, onResumeLessonDialogue: onResumeLessonDialogue, onStartReinforcement: onStartReinforcement, onOpenAssessment: onOpenAssessment, ), LessonPath(state: state, onOpenLesson: onOpenLesson), const _FrameworkNote(), ], ), ); } class _FrameworkNote extends StatelessWidget { const _FrameworkNote(); @override Widget build(BuildContext context) => Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Icon(Icons.info_outline, color: AppColors.muted, size: 16), const SizedBox(width: 6), Expanded( child: Text( '口语掌握以录音或语音识别结果为准;AI 服务可在“我的”中配置。', style: TextStyle(color: AppColors.muted, fontSize: 12, height: 1.45), ), ), ], ); }