123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
-
- import 'package:flutter/widgets.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:get/get_rx/src/rx_types/rx_types.dart';
- import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart';
-
- import '../models/entities/CardInfo.dart';
- import '../models/entities/ExtendContent.dart';
-
- class ExtendContentList extends StatelessWidget {
- final List<ContentImageList> item;
-
- const ExtendContentList({ Key? key, required this.item }) : super(key: key);
-
- Widget? _image(String? content) {
- if (null == content || content.isEmpty) return null;
- return Image.network(content, fit: BoxFit.cover);
- }
-
- Widget? _text(String? content) {
- if (null == content || content.isEmpty) return null;
- return Text(content);
- }
-
- @override
- Widget build(BuildContext context) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return Container(
- child: Column(
- children: item.map((item) {
- if (item.contentType != 'image') {
- return Container(
- padding: EdgeInsets.fromLTRB(0, 20, 0, 10),
- width: 344.w,
- child: _text(item.content)
- );
- } else {
- return Container(
- padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
- child: _image(item.content),
- );
- }
- }).toList(),
- ),
- );
-
- }
-
- }
|