123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- import 'package:flutter/material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:get/get.dart';
- import 'package:get/get_core/src/get_main.dart';
-
- import '../../../ArticleInfo/ArticleInfo.dart';
-
- class Information extends StatefulWidget {
- const Information({Key? key}) : super(key: key);
-
- @override
- State<Information> createState() => _InformationState();
- }
-
- class _InformationState extends State<Information> {
- @override
- Widget build(BuildContext context) {
- return ListView(
- children: [
- // ListTile用不好
-
- GestureDetector(
- child: Container(
- padding: EdgeInsets.fromLTRB(0, 30, 0, 30),
- width: 310.w,
- decoration: const BoxDecoration(
- border: Border(
- bottom: BorderSide(width: 0.5, color: Color(0x20000000)
- // 0x17000000
- ))),
- child: Row(
- children: [
- Container(
- margin: EdgeInsets.fromLTRB(15, 0, 11, 0),
- width: 100,
- height: 100,
- decoration: BoxDecoration(
- image: DecorationImage(
- image: AssetImage('images/cars.png'),
- fit: BoxFit.cover,
- ),
- borderRadius: BorderRadius.circular(12),
- ),
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Container(
- width: 240.w,
- padding: EdgeInsets.fromLTRB(0, 0, 0, 30),
- child: Text("我我就是一个标题,什阿三大苏打333萨达萨达萨达v么特不是",
- softWrap: true,
- maxLines: 2,
- textAlign: TextAlign.left,
- overflow: TextOverflow.ellipsis,
- style: TextStyle(
- fontSize: 17.sp,
- fontWeight: FontWeight.bold,
- )),
- ),
- Container(
- child: Text('2022-02-09'),
- )
- ],
- )
- ],
- )),
- onTap: () {
- Get.to(ArticleInfo());
- },
- ),
- GestureDetector(
- child: Container(
- padding: EdgeInsets.fromLTRB(0, 30, 0, 30),
- width: 310.w,
- decoration: const BoxDecoration(
- border: Border(
- bottom: BorderSide(width: 0.5, color: Color(0x20000000)
- // 0x17000000
- ))),
- child: Row(
- children: [
- Container(
- margin: EdgeInsets.fromLTRB(15, 0, 11, 0),
- width: 100,
- height: 100,
- decoration: BoxDecoration(
- image: DecorationImage(
- image: AssetImage('images/cars.png'),
- fit: BoxFit.cover,
- ),
- borderRadius: BorderRadius.circular(12),
- ),
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Container(
- width: 240.w,
- padding: EdgeInsets.fromLTRB(0, 0, 0, 30),
- child: Text("我我就是一个标题,什阿三大苏打333萨达萨达萨达v么特不是",
- softWrap: true,
- maxLines: 2,
- textAlign: TextAlign.left,
- overflow: TextOverflow.ellipsis,
- style: TextStyle(
- fontSize: 17.sp,
- fontWeight: FontWeight.bold,
- )),
- ),
- Container(
- child: Text('2022-02-09'),
- )
- ],
- )
- ],
- )),
- onTap: () {
- print('进入资讯详情');
- },
- )
- ],
- );
- }
- }
|