2a3621f8
吴启风
feat:课程层级调整(增加unit层)
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wow_english/common/extension/string_extension.dart';
import 'package:wow_english/pages/user/bloc/user_bloc.dart';
import '../../../models/course_module_entity.dart';
import '../../home/courese_module_model.dart';
class CourseUnitHeaderWidget extends StatelessWidget {
const CourseUnitHeaderWidget({super.key, this.entity});
final CourseModuleEntity? entity;
@override
Widget build(BuildContext context) {
return BlocBuilder<UserBloc, UserState>(
builder: (context, state) {
return Container(
height: 45,
width: double.infinity,
color:
CourseModuleModel(entity?.code ?? 'Phase-1').color,
padding: EdgeInsets.symmetric(horizontal: 9.5.w),
child: Row(
children: [
ScreenUtil().bottomBarHeight.horizontalSpace,
GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Container(
alignment: Alignment.center,
child: Image.asset(
'back_around'.assetPng,
height: 40.h,
width: 40.w,
),
),
),
20.horizontalSpace,
Expanded(
child: Text(entity?.name ??
CourseModuleModel(entity?.code ?? 'Phase-1')
.courseModuleTitle,
textAlign: TextAlign.left,
style: const TextStyle(color: Colors.white, fontSize: 30.0),
)),
ScreenUtil().bottomBarHeight.horizontalSpace,
],
));
},
);
}
}
|