123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- import 'package:flutter/material.dart';
- import 'package:flutter/cupertino.dart';
- import 'package:ysairplane/base/YSBase.dart';
- import 'package:ysairplane/code/YSHomeMsgDetail.dart';
- import 'package:ysairplane/code/YSHomeMsgSetting.dart';
- import 'package:ysairplane/tools/YSTools.dart';
- class YSHomeMsg extends StatefulWidget {
- @override
- _YSHomeMsgState createState() => _YSHomeMsgState();
- }
- class _YSHomeMsgState extends State<YSHomeMsg> {
- @override
- Widget build(BuildContext context) {
- return YSBase(
- ystitle: '消息',
- ysright: GestureDetector(
- child: Icon(Icons.settings,size: hsp(40),color: Color(0xFF444444),),
- onTap: (){
- Navigator.of(context).push(
- CupertinoPageRoute(
- builder: (context){
- return YSHomeMsgSetting();
- }
- )
- );
- },
- ),
- yschild: Container(
- width: MediaQuery.of(context).size.width,
- height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
- color: Color(0xFFF1F2F3),
- child: ListView.separated(
- padding: EdgeInsets.only(top: hsp(10),bottom: hsp(10)),
- shrinkWrap: true,
- itemBuilder: (context,index){
- return GestureDetector(
- onTap: (){
- Navigator.of(context).push(
- CupertinoPageRoute(
- builder: (context){
- return YSHomeMsgDetail();
- }
- )
- );
- },
- child: Container(
- color: Color(0xFFFAFAFA),
- padding: EdgeInsets.all(hsp(30)),
- child: Row(
- children: [
- Stack(
- children: [
- Container(
- height: hsp(100),
- width: hsp(100),
- margin: EdgeInsets.only(top: hsp(5),right: wsp(20)),
- decoration: BoxDecoration(
- color: Color(0xFF3E81D0),
- borderRadius: BorderRadius.all(Radius.circular(5))
- ),
- ),
- Container(
- height: hsp(20),
- width: hsp(20),
- margin: EdgeInsets.only(left: hsp(85)),
- decoration: BoxDecoration(
- color: Color(0xFFE95D58),
- borderRadius: BorderRadius.all(Radius.circular(hsp(10)))
- ),
- )
- ],
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Container(
- width: MediaQuery.of(context).size.width-hsp(160)-wsp(20),
- margin: EdgeInsets.only(bottom: hsp(10)),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Container(
- child: Text('订单生成成功',style: TextStyle(fontSize: zsp(32),color: Color(0xFF000000)),maxLines: 1,overflow: TextOverflow.ellipsis,),
- width: (MediaQuery.of(context).size.width-hsp(160)-wsp(20))*0.65,
- ),
- Text('下午 3:44',style: TextStyle(fontSize: zsp(22),color: Color(0xFFCCCCCC)),),
- ],
- ),
- ),
- Container(
- child: Text('订单编号:23140000,上海到西安,请及时支付',style: TextStyle(fontSize: zsp(28),color: Color(0xFF999999)),maxLines: 1,overflow: TextOverflow.ellipsis,),
- width: MediaQuery.of(context).size.width-hsp(160)-wsp(20),
- )
- ],
- )
- ],
- ),
- ),
- );
- },
- separatorBuilder: (context,index){
- return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F3),);
- },
- itemCount: 5
- ),
- ),
- );
- }
- }
|