lesson_card_item.dart
3.75 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class LessonCardItem extends StatelessWidget {
const LessonCardItem({super.key, required this.onTap});
final Function() onTap;
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
color: Colors.blue,
border: Border.all(
width: 1.0,
color: Colors.black
)
// image: DecorationImage(
// image: AssetImage(
// ''.assetPng,
// ),
// fit: BoxFit.fill
// )
),
padding: EdgeInsets.symmetric(horizontal: 16.w,vertical: 16.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 124.w,
decoration: BoxDecoration(
border: Border.all(
width: 1.0,
color: const Color(0xFF333333),
),
image: const DecorationImage(
fit: BoxFit.fill,
image: NetworkImage('https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Faa1c2213-820a-4223-8757-5f8cee318a28%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1688713226&t=192b18a613683bcdc5bd76f65c9ff032'),
)
),
),
21.5.horizontalSpace,
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'Wow English 课程年卡',
softWrap: true,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 12.sp,
color: const Color(0xFF333333)
),
),
RichText(
text: TextSpan(
children:[
TextSpan(
text: '¥',
style: TextStyle(
fontSize: 21.sp,
color: const Color(0xFFF51A1A),
)
),
TextSpan(
text: '998',
style: TextStyle(
fontSize: 40.sp,
color: const Color(0xFFF51A1A),
),
)
]
),
),
GestureDetector(
onTap: () {
onTap();
},
child: Container(
decoration: BoxDecoration(
color: const Color(0xFFF5C51F),
borderRadius: BorderRadius.circular(5.r),
border: Border.all(
color: const Color(0xFF333333),
width: 1.0,
)
),
padding: EdgeInsets.symmetric(
vertical: 1.h,
horizontal: 26.5.w,
),
child: Text(
'立即购买',
style: TextStyle(
fontSize: 10.sp,
color: const Color(0xFF333333)
),
),
),
)
],
),
)
],
),
);
}
}