| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- 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 PostDetail extends StatefulWidget {
- PostDetail({Key key}) : super(key: key);
- @override
- _PostDetailState createState() => _PostDetailState();
- }
- class _PostDetailState extends State<PostDetail> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: appBarLight('热议话题'),
- body: Column(
- children: [
- Expanded(
- child: CustomScrollView(
- slivers: [
- SliverToBoxAdapter(
- child: Container(
- decoration: BoxDecoration(border: Border(bottom: BorderSide(width: 5, color: COLOR_BORDER))),
- child: ItemPost(),
- ),
- ),
- 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,
- )),
- ),
- ),
- ),
- ),
- ],
- ),
- );
- }
- }
|