| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- import 'package:cached_network_image/cached_network_image.dart';
- import 'package:flutter/material.dart';
- import 'package:jmrh/constant/styles.dart';
- import 'package:jmrh/widget/item_comment.dart';
- import 'package:jmrh/widget/item_post.dart';
- class QaDetail extends StatefulWidget {
- QaDetail({Key key}) : super(key: key);
- @override
- _QaDetailState createState() => _QaDetailState();
- }
- class _QaDetailState extends State<QaDetail> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: appBarLight('问答详情'),
- resizeToAvoidBottomInset: true,
- resizeToAvoidBottomPadding: true,
- body: Column(
- children: [
- Expanded(
- child: CustomScrollView(
- slivers: [
- SliverToBoxAdapter(
- child: Container(
- decoration: BoxDecoration(border: Border(bottom: BorderSide(width: 5, color: COLOR_BORDER))),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Container(
- margin: EdgeInsets.only(left: 16, right: 16, top: 16),
- child: Row(
- children: [
- ClipOval(
- child: Image.asset('img/img_defaultphoto.png', width: 26, height: 26),
- ),
- Expanded(
- child: Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- '官方平台',
- style: TextStyle(fontSize: 14, color: Colors.black),
- overflow: TextOverflow.ellipsis,
- ),
- ),
- ),
- Text(
- '05-23',
- style: TextStyle(color: COLOR_TEXT_2, fontSize: 13),
- )
- ],
- ),
- ),
- Container(
- margin: EdgeInsets.only(left: 16, right: 16, top: 10),
- child: Row(
- children: [
- Container(
- width: 18,
- height: 18,
- alignment: Alignment.center,
- decoration: BoxDecoration(
- color: COLOR_PRIMARY, borderRadius: BorderRadius.all(Radius.circular(2))),
- child: Text('问', style: TextStyle(color: Colors.white, fontSize: 11)),
- ),
- Expanded(
- child: Container(
- margin: EdgeInsets.only(left: 5),
- child: Text(
- '李克强考察南昌航空城为何强调一个李克强考察南昌航空城为何强调一个李克强考察南昌航空城为何强调一个“捧”字?',
- style: TextStyle(color: COLOR_TEXT_1, fontSize: 14, fontWeight: FontWeight.bold),
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- ),
- ),
- )
- ],
- ),
- ),
- Container(
- margin: EdgeInsets.only(left: 16, right: 16, top: 10),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Container(
- width: 18,
- height: 18,
- alignment: Alignment.center,
- decoration: BoxDecoration(
- color: Color(0xFFFFC23B), borderRadius: BorderRadius.all(Radius.circular(2))),
- child: Text('答', style: TextStyle(color: Colors.white, fontSize: 11)),
- ),
- Expanded(
- child: Container(
- margin: EdgeInsets.only(left: 5),
- child: Text(
- '李克强11月15日上午考察南昌航空城,在首款国产大飞机C919装配厂勉励员工:“安全舒适的大飞机要从你们手中捧出来、飞上天。我为什么要说‘捧’字呢?因为飞机制造是一个高精密的活儿,要像捧宝贝一样。”李克强一一考察了飞机装配的材料、设备和工艺。他对质量检测岗工作人员说,客运飞机最重要的是安全,只有保证绝对安全,才能树立信誉,赢得市场。在职业技能培训中心,李克强察看不同工种实训,并与获得世界技能大赛银奖的技师亲切交流。他说,飞机制造质量,事关人的生命,必须倾注高度的专业技能和极致的工匠精神。总理祝愿中国航空争取早日走向世界、环绕世界、誉满全球。',
- style: TextStyle(color: COLOR_TEXT_1, fontSize: 13, height: 1.4),
- ),
- ),
- )
- ],
- ),
- ),
- Container(
- height: 46,
- child: Row(
- children: [
- Expanded(
- child: Row(children: [
- Image.asset('img/icon_redu.png'),
- Container(
- margin: EdgeInsets.only(left: 4),
- child: Text(
- '26461',
- style: TextStyle(color: COLOR_TEXT_3, fontSize: 13),
- ),
- )
- ], mainAxisAlignment: MainAxisAlignment.center),
- ),
- Expanded(
- child: Row(children: [
- Image.asset('img/icon_pingjia.png'),
- Container(
- margin: EdgeInsets.only(left: 4),
- child: Text(
- '3644',
- style: TextStyle(color: COLOR_TEXT_3, fontSize: 13),
- ),
- )
- ], mainAxisAlignment: MainAxisAlignment.center),
- ),
- Expanded(
- child: Row(children: [
- Image.asset('img/icon_dianzhan.png'),
- Container(
- margin: EdgeInsets.only(left: 4),
- child: Text(
- '11243',
- style: TextStyle(color: COLOR_TEXT_3, fontSize: 13),
- ),
- )
- ], mainAxisAlignment: MainAxisAlignment.center),
- )
- ],
- ),
- )
- ],
- ),
- ),
- ),
- SliverToBoxAdapter(
- child: Container(
- margin: EdgeInsets.only(left: 16, top: 16, bottom: 10),
- child: Text(
- '评论56',
- style: TextStyle(color: COLOR_TEXT_1, fontSize: 14, fontWeight: FontWeight.bold),
- ),
- ),
- ),
- SliverList(
- delegate:
- SliverChildBuilderDelegate((BuildContext context, int index) => ItemComment(), childCount: 10),
- )
- ],
- ),
- ),
- SafeArea(
- child: Container(
- height: 50,
- padding: EdgeInsets.symmetric(horizontal: 16, vertical: 7),
- child: Container(
- height: 36,
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.symmetric(horizontal: 15),
- decoration: BoxDecoration(
- color: COLOR_INPUT_BG,
- borderRadius: BorderRadius.all(
- Radius.circular(2),
- ),
- ),
- child: TextField(
- style: TextStyle(fontSize: 14),
- decoration: InputDecoration.collapsed(
- hintText: '发表您的观点…',
- hintStyle: TextStyle(
- fontSize: 13,
- color: COLOR_TEXT_3,
- )),
- ),
- ),
- ),
- ),
- ],
- ),
- );
- }
- }
|