1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- import 'package:flutter/material.dart';
- import 'package:flutter/cupertino.dart';
- import 'package:ysairplane/base/YSBase.dart';
- class YSCollection extends StatefulWidget {
- @override
- _YSCollectionState createState() => _YSCollectionState();
- }
- class _YSCollectionState extends State<YSCollection> {
- @override
- Widget build(BuildContext context) {
- return YSBase(
- ystitle: '收藏',
- yschild: Container(
- height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
- width: MediaQuery.of(context).size.width,
- color: Color(0xFFF5F6F8),
- child: ListView.separated(
- itemBuilder: (context,index){
- return Container(
- height: 100,
- padding: EdgeInsets.all(10),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.all(Radius.circular(5)),
- ),
- child: Column(
- children: [
- Row(
- children: [
- Container(
- height: 50,
- width: 50,
- decoration: BoxDecoration(
- color: Colors.lightBlue,
- borderRadius: BorderRadius.all(Radius.circular(5))
- ),
- ),
- Container(
- margin: EdgeInsets.only(left: 10),
- height: 50,
- width: MediaQuery.of(context).size.width-100,
- child: Text('最美白头山的夏天最美白头山的夏天',style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16,color: Color(0xFF333333)),overflow: TextOverflow.ellipsis,maxLines: 2,),
- )
- ],
- ),
- Container(
- margin: EdgeInsets.only(top: 15),
- width: MediaQuery.of(context).size.width-40,
- child: Text('小精灵小姐 2020-08-14 14:12',style: TextStyle(fontSize: 10,color: Color(0xFF999999))),
- )
- ],
- ),
- );
- },
- separatorBuilder: (context,index){
- return Container(
- height: 10,
- );
- },
- itemCount: 10,
- padding: EdgeInsets.only(top: 10,bottom: 30,left: 10,right: 10),
- ),
- ),
- );
- }
- }
|