poem_user_comments.dart
1.79 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
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class PoemUserComments extends StatelessWidget {
const PoemUserComments({
Key? key,
this.comments, //TODO 传入数据
this.desc,
}) : super(key: key);
final List<Map<String, String>>? comments;
final String? desc;
@override
Widget build(BuildContext context) {
return SizedBox(
height: 360, //TODO 高度待定
width: double.infinity,
child: Flex(
direction: Axis.vertical,
children: [
Container(
alignment: Alignment.centerLeft,
padding:
const EdgeInsets.symmetric(vertical: 5.0, horizontal: 10.0),
child: Text(
desc ?? "一大波用户朗读录制提交了“临境”",
style: const TextStyle(color: Colors.white, fontSize: 15.0),
),
),
Expanded(
flex: 1,
child: Container(
padding:
const EdgeInsets.symmetric(vertical: 5.0, horizontal: 10.0),
width: double.infinity,
child: ListView.builder(
itemBuilder: (BuildContext context, int index) {
return Wrap(
spacing: 5.0,
crossAxisAlignment: WrapCrossAlignment.center,
children: const [
Icon(
Icons.play_circle_outline,
size: 16.0,
color: Colors.white,
),
Text(
"普通话",
style: TextStyle(color: Colors.white, fontSize: 16.0),
)
],
);
}),
),
)
],
),
);
}
}