You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
6.3 KiB

import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:akuCommunity/utils/screenutil.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
import 'package:akuCommunity/widget/common_app_bar.dart';
const htmlData = '''
<p>
1
5<br /><br /><br />
1<br />
<br />
24
<br />
<br />
5<br /><br /><br />
APP
线
<br />
使
<br />
<br />
<br />
<br />
</p>
''';
class NoticePage extends StatelessWidget {
final Bundle bundle;
NoticePage({Key key,this.bundle}) : super(key: key);
Widget _creater() {
return Container(
child: Row(
children: [
Container(
margin: EdgeInsets.only(right: Screenutil.length(12)),
child: ClipOval(
child: CachedImageWrapper(
url:
'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1380335538,732392216&fm=26&gp=0.jpg',
width: Screenutil.length(45),
height: Screenutil.length(45),
),
),
),
RichText(
text: TextSpan(
children: <InlineSpan>[
TextSpan(
text: '管理员 ',
style: TextStyle(
fontSize: Screenutil.size(24),
color: Color(0xff999999),
),
),
TextSpan(
text: ' 发布于 ',
style: TextStyle(
fontSize: Screenutil.size(24),
color: Color(0xff666666),
),
),
TextSpan(
text: '2020-08-12',
style: TextStyle(
fontSize: Screenutil.size(24),
color: Color(0xff999999),
),
),
],
),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
child: CommonAppBar(
title: '社区公告',
),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Stack(
children: [
Container(
color: Colors.white,
child: ListView(
padding: EdgeInsets.only(
top: Screenutil.length(26),
left: Screenutil.length(32),
right: Screenutil.length(32),
bottom: Screenutil.length(60)),
children: [
Text(
bundle.getMap('details')['title'],
style: TextStyle(
fontSize: Screenutil.size(32),
color: Color(0xff333333),
fontWeight: FontWeight.w600,),
),
Container(
margin: EdgeInsets.only(top: Screenutil.length(45)),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(6)),
child: CachedImageWrapper(
url: bundle.getMap('details')['imagePath'],
width: Screenutil.length(686),
height: Screenutil.length(228),
),
),
),
Container(
margin: EdgeInsets.only(top: Screenutil.length(44)),
width: Screenutil.length(647),
child: Html(data: htmlData),
),
_creater(),
],
),
),
],
),
);
}
}