d1d32220
liangchengyou
feat:兑换课程+购买记录
|
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
56
57
58
59
60
|
class ShopHomePage extends StatelessWidget {
const ShopHomePage({super.key});
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => ShopHomeBloc(),
child: _ShopHomeView(),
);
}
}
class _ShopHomeView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocListener<ShopHomeBloc,ShopHomeState>(
listener: (context, state) {},
child: _shopHomeWidget(),
);
}
Widget _shopHomeWidget() => BlocBuilder<ShopHomeBloc,ShopHomeState>(builder: (context, state){
return Scaffold(
appBar: WEAppBar(
actions: [
IconButton(
icon: Image.asset(
'check_lesson'.assetPng,
width: 40,
height: 40,
),
color: Colors.white,
onPressed: () {
Navigator.of(context).pushNamed(AppRouteName.exLesson);
},
),
IconButton(
icon: Image.asset(
'shop'.assetPng,
width: 40,
height: 40,
),
color: Colors.white,
onPressed: () {
EasyLoading.showToast('购前须知');
},
)
],
),
|
7652f701
liangchengyou
feat:课程购买UI逻辑
|
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
body: Center(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 25.h,horizontal: 25.w),
child: GridView.builder(
itemCount: 4,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: 2,
mainAxisSpacing: 14.h,
crossAxisSpacing : 4.5.w,
),
itemBuilder: (BuildContext context,int index){
return LessonCardItem(
onTap: (){
EasyLoading.showToast('购买');
});
}),
),
),
|