|
@@ -1,10 +1,6 @@
|
1
|
1
|
import 'package:flutter/widgets.dart';
|
2
|
2
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
3
|
|
-import 'package:get/get_rx/src/rx_types/rx_types.dart';
|
4
|
|
-import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart';
|
5
|
|
-
|
6
|
3
|
import '../models/entities/CardInfo.dart';
|
7
|
|
-import '../models/entities/ExtendContent.dart';
|
8
|
4
|
|
9
|
5
|
class ExtendContentList extends StatelessWidget {
|
10
|
6
|
final List<ContentImageList> item;
|
|
@@ -23,37 +19,20 @@ class ExtendContentList extends StatelessWidget {
|
23
|
19
|
|
24
|
20
|
@override
|
25
|
21
|
Widget build(BuildContext context) {
|
26
|
|
- //
|
27
|
|
- // List<Widget> _widgets = [];
|
28
|
|
- // Container(
|
29
|
|
- // child: item.contentType == "image" ? _image(item.content) : _text(item.content),
|
30
|
|
- // );
|
31
|
|
- // for (var i = 0; i < item.length; i += 1) {
|
32
|
|
- // if (i != 0 ) {
|
33
|
|
- // _widgets.add(SizedBox(height: 20.w,));
|
34
|
|
- // }
|
35
|
|
- // var item = item[i];
|
36
|
|
- // _widgets.add(Container(
|
37
|
|
- // child: item.contentType == "image" ? _image(item.content) : _text(item.content),
|
38
|
|
- // ));
|
39
|
|
- // }
|
40
|
|
-
|
41
|
|
- return Container(
|
42
|
|
- child: Column(
|
43
|
|
- children: item.map((item) {
|
44
|
|
- if (item.contentType != 'image') {
|
45
|
|
- return Container(
|
46
|
|
- padding: EdgeInsets.fromLTRB(0, 20, 0, 10),
|
47
|
|
- width: 344.w,
|
48
|
|
- child: _text(item.content));
|
49
|
|
- } else {
|
50
|
|
- return Container(
|
51
|
|
- padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
|
52
|
|
- child: _image(item.content),
|
53
|
|
- );
|
54
|
|
- }
|
55
|
|
- }).toList(),
|
56
|
|
- ),
|
|
22
|
+ return Column(
|
|
23
|
+ children: item.map((item) {
|
|
24
|
+ if (item.contentType != 'image') {
|
|
25
|
+ return Container(
|
|
26
|
+ padding: EdgeInsets.fromLTRB(0, 20, 0, 10),
|
|
27
|
+ width: 344.w,
|
|
28
|
+ child: _text(item.content));
|
|
29
|
+ } else {
|
|
30
|
+ return Container(
|
|
31
|
+ padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
|
|
32
|
+ child: _image(item.content),
|
|
33
|
+ );
|
|
34
|
+ }
|
|
35
|
+ }).toList(),
|
57
|
36
|
);
|
58
|
37
|
}
|
59
|
38
|
}
|