8988aa69
liangchengyou
feat:首页+课程列表数据获取
|
1
2
3
|
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wow_english/common/extension/string_extension.dart';
|
6f617434
liangchengyou
feat:磨耳朵/视频跟读列表页接口调整
|
4
|
import 'package:wow_english/common/widgets/ow_image_widget.dart';
|
68dd7ba8
liangchengyou
feat:首页主题颜色+已知问题修改
|
5
|
|
42f15f6c
吴启风
feat:模块选择持久化&模块主题...
|
6
|
import '../../../common/core/module_cache.dart';
|
2187c85f
吴启风
feat:课程结构调整
|
7
|
import '../../../models/course_section_entity.dart';
|
8988aa69
liangchengyou
feat:首页+课程列表数据获取
|
8
|
|
e620143b
吴启风
feat:单元&课程解锁状态蒙层ui
|
9
10
|
///环节item布局
class SectionItem extends StatelessWidget {
|
42f15f6c
吴启风
feat:模块选择持久化&模块主题...
|
11
|
const SectionItem({super.key, this.lessons});
|
8988aa69
liangchengyou
feat:首页+课程列表数据获取
|
12
|
|
2187c85f
吴启风
feat:课程结构调整
|
13
|
final CourseSectionEntity? lessons;
|
8988aa69
liangchengyou
feat:首页+课程列表数据获取
|
14
15
16
|
@override
Widget build(BuildContext context) {
|
ad8454ca
liangchengyou
feat:调整模型
|
17
|
return Padding(
|
1e7094e3
liangchengyou
feat:适配ipad
|
18
|
padding: EdgeInsets.symmetric(horizontal: 12.w,vertical: 24.h),
|
e620143b
吴启风
feat:单元&课程解锁状态蒙层ui
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
child: Stack(
children: [
_normalItem(),
_lockWidget(),
],
)
);
}
Widget _normalItem() {
return Container(
width: 165.w,
padding: EdgeInsets.symmetric(horizontal: 16.w,vertical: 24.h),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('gendubeij'.assetPng),
fit: BoxFit.fill
|
ad8454ca
liangchengyou
feat:调整模型
|
36
|
),
|
e620143b
吴启风
feat:单元&课程解锁状态蒙层ui
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Container(
decoration: BoxDecoration(
border: Border.all(
width: 2,
color: const Color(0xFF140C10),
),
borderRadius: BorderRadius.circular(6)
),
child: OwImageWidget(
name: lessons?.coverUrl??'',
fit: BoxFit.fitHeight,
),
)
),
24.verticalSpace,
Container(
decoration: BoxDecoration(
border: Border.all(
width: 2,
color: const Color(0xFF140C10),
),
|
42f15f6c
吴启风
feat:模块选择持久化&模块主题...
|
63
|
color: ModuleCache.instance.getCurrentThemeColor(),
|
e620143b
吴启风
feat:单元&课程解锁状态蒙层ui
|
64
|
borderRadius: BorderRadius.circular(6)
|
68dd7ba8
liangchengyou
feat:首页主题颜色+已知问题修改
|
65
|
),
|
e620143b
吴启风
feat:单元&课程解锁状态蒙层ui
|
66
67
68
69
70
71
72
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Text(
lessons?.name??'',
maxLines: 1,
style: TextStyle(
fontSize: 25.sp,
color: const Color(0xFF333333)
|
ad8454ca
liangchengyou
feat:调整模型
|
73
|
),
|
e620143b
吴启风
feat:单元&课程解锁状态蒙层ui
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
),
)
],
),
);
}
///锁定状态下蒙层视图
Widget _lockWidget() {
return Visibility(
visible: lessons?.lock ?? false,
child: Container(
width: 165.w,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(
'gendubeij_mengban'.assetPng
|
8988aa69
liangchengyou
feat:首页+课程列表数据获取
|
91
|
),
|
e620143b
吴启风
feat:单元&课程解锁状态蒙层ui
|
92
|
fit: BoxFit.fill
|
ad8454ca
liangchengyou
feat:调整模型
|
93
|
)
|
ad8454ca
liangchengyou
feat:调整模型
|
94
|
),
|
e620143b
吴启风
feat:单元&课程解锁状态蒙层ui
|
95
96
97
98
99
100
|
alignment: Alignment.center,
// child: Image.asset(
// 'iv_lock'.assetPng,
// height: 36.h,
// width: 41.w,
// ),
|
8988aa69
liangchengyou
feat:首页+课程列表数据获取
|
101
102
103
104
|
),
);
}
}
|