123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import 'package:flutter/material.dart';
- import 'package:flutter/widgets.dart';
- import 'package:shared/utils/color_utils.dart';
- import 'package:widgets/my_text_view.dart';
- // 'id':1,
- // 'avator': Assets.communityCamera,
- // 'title': 'William Jefferson',
- // 'isFollow': false,
- // 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
- // 'imageUrls': ['https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg'],
- // 'time': 'June 17,2016 at 7:23 p.m.',
- // 'likeno': 12
- class GarageCardContent extends StatelessWidget {
- const GarageCardContent({
- Key? key,
- required this.content,
- this.imageUrls,
- }) : super(key: key);
- final String content;
- final List? imageUrls;
- @override
- Widget build(BuildContext context) {
- return Container(
- padding: const EdgeInsets.symmetric(horizontal: 16),
- child: Column(
- children: [
- Expanded(
- child: Container(
- // color: Colors.red,
- child: MyTextView(
- content,
- textColor: ColorUtils.string2Color('#000000'),
- fontSize: 15,
- maxLines: 3,
- isTextEllipsis: true,
- ),
- ),
- ),
- const SizedBox(height: 12),
- // 图片
- if (imageUrls != null && imageUrls!.isNotEmpty)
- Container(
- width: double.infinity,
- height: 87,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- for (var item in imageUrls!)
- Expanded(
- child: Container(
- // width: 87,
- // height: 87,
- // margin: const EdgeInsets.only(right: 30),
- margin: const EdgeInsets.only(left: 15,right: 18),
- color: ColorUtils.string2Color("#F2F3F6"),
- ),
- )
- ],
- ),
- )
- ]
- ),
- );
- }
- }
|