2a3621f8
吴启风
feat:课程层级调整(增加unit层)
|
1
2
3
4
5
6
|
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';
|
42f15f6c
吴启风
feat:模块选择持久化&模块主题...
|
7
|
import '../../../common/core/module_cache.dart';
|
2a3621f8
吴启风
feat:课程层级调整(增加unit层)
|
8
|
|
37063ced
吴启风
feat:阶段选择指示器与阶段色联...
|
9
|
/// 环节(课程)列表页标题栏
|
2187c85f
吴启风
feat:课程结构调整
|
10
|
class SectionHeaderWidget extends StatelessWidget {
|
37063ced
吴启风
feat:阶段选择指示器与阶段色联...
|
11
|
const SectionHeaderWidget(
|
42f15f6c
吴启风
feat:模块选择持久化&模块主题...
|
12
|
{super.key, this.title, this.onBack});
|
2a3621f8
吴启风
feat:课程层级调整(增加unit层)
|
13
|
|
2187c85f
吴启风
feat:课程结构调整
|
14
15
|
final String? title;
|
0cbdbb34
吴启风
feat:环节列表页返回单元列表页...
|
16
17
|
final VoidCallback? onBack;
|
2a3621f8
吴启风
feat:课程层级调整(增加unit层)
|
18
19
20
21
22
23
24
|
@override
Widget build(BuildContext context) {
return BlocBuilder<UserBloc, UserState>(
builder: (context, state) {
return Container(
height: 45,
width: double.infinity,
|
42f15f6c
吴启风
feat:模块选择持久化&模块主题...
|
25
|
color: ModuleCache.instance.getCurrentThemeColor(),
|
2a3621f8
吴启风
feat:课程层级调整(增加unit层)
|
26
27
28
29
30
31
|
padding: EdgeInsets.symmetric(horizontal: 9.5.w),
child: Row(
children: [
ScreenUtil().bottomBarHeight.horizontalSpace,
GestureDetector(
onTap: () {
|
0cbdbb34
吴启风
feat:环节列表页返回单元列表页...
|
32
33
34
35
36
|
if (onBack == null) {
Navigator.pop(context);
} else {
onBack!();
}
|
2a3621f8
吴启风
feat:课程层级调整(增加unit层)
|
37
38
39
40
41
42
43
44
45
46
47
48
|
},
child: Container(
alignment: Alignment.center,
child: Image.asset(
'back_around'.assetPng,
height: 40.h,
width: 40.w,
),
),
),
20.horizontalSpace,
Expanded(
|
2187c85f
吴启风
feat:课程结构调整
|
49
|
child: Text(
|
42f15f6c
吴启风
feat:模块选择持久化&模块主题...
|
50
|
title ?? ModuleCache.instance.getCurrentThemeName(),
|
2a3621f8
吴启风
feat:课程层级调整(增加unit层)
|
51
52
53
54
55
56
57
58
59
60
|
textAlign: TextAlign.left,
style: const TextStyle(color: Colors.white, fontSize: 30.0),
)),
ScreenUtil().bottomBarHeight.horizontalSpace,
],
));
},
);
}
}
|