import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:ysairplane2/base/YSBase.dart'; import 'package:ysairplane2/tools/YSNetWorking.dart'; import 'package:ysairplane2/tools/YSTools.dart'; class YSHomeMsgDetail extends StatefulWidget { final detailDict; const YSHomeMsgDetail({Key key, this.detailDict}) : super(key: key); @override _YSHomeMsgDetailState createState() => _YSHomeMsgDetailState(); } class _YSHomeMsgDetailState extends State { @override void initState() { Future.delayed(Duration(seconds: 0)).then((value){ _getMsgDetailData(); }); super.initState(); } @override Widget build(BuildContext context) { return YSBase( ystitle: '消息详情', yschild: Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44, color: Color(0xFFF1F2F3), child: Column( children: [ Container( padding: EdgeInsets.all(hsp(30)), color: Color(0xFFFAFAFA), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('${widget.detailDict['createTime']}',style: TextStyle(fontSize: zsp(22),color: Color(0xFFCCCCCC)),), Container( margin: EdgeInsets.only(top: hsp(20),bottom: hsp(20)), child: Text('${widget.detailDict['title']}',style: TextStyle(fontSize: zsp(34),color: Color(0xFF000000),fontWeight: FontWeight.bold),), ), Text('${widget.detailDict['content']}',style: TextStyle(fontSize: zsp(26),color: Color(0xFFB7B7B7)),), ], ), ) ], ), ), ); } _getMsgDetailData() async{ Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/message/get',parameter: {'id':widget.detailDict['id']}, isToken: true,refresh: (){_getMsgDetailData();}); if(dict!=null){ } } }