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.

159 lines
6.0 KiB

4 years ago
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_html/flutter_html.dart';
4 years ago
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.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(
4 years ago
margin: EdgeInsets.only(right: 12.w),
child: ClipOval(
child: CachedImageWrapper(
url:
'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1380335538,732392216&fm=26&gp=0.jpg',
4 years ago
width: 45.w,
height: 45.w,
),
),
),
RichText(
text: TextSpan(
children: <InlineSpan>[
TextSpan(
text: '管理员 ',
style: TextStyle(
4 years ago
fontSize: 24.sp,
color: Color(0xff999999),
),
),
TextSpan(
text: ' 发布于 ',
style: TextStyle(
4 years ago
fontSize: 24.sp,
color: Color(0xff666666),
),
),
TextSpan(
text: '2020-08-12',
style: TextStyle(
4 years ago
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
),
],
),
);
}
@override
Widget build(BuildContext context) {
4 years ago
return BeeScaffold(
title: '社区公告',
body: Stack(
children: [
Container(
color: Colors.white,
child: ListView(
padding: EdgeInsets.only(
4 years ago
top: 26.w,
left: 32.w,
right: 32.w,
bottom: 60.w),
children: [
Text(
bundle.getMap('details')['title'],
style: TextStyle(
4 years ago
fontSize: 32.sp,
color: Color(0xff333333),
fontWeight: FontWeight.w600,),
),
Container(
4 years ago
margin: EdgeInsets.only(top: 45.w),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(6)),
child: CachedImageWrapper(
url: bundle.getMap('details')['imagePath'],
4 years ago
width: 686.w,
height: 228.w,
),
),
),
Container(
4 years ago
margin: EdgeInsets.only(top: 44.w),
width: 647.w,
child: Html(data: htmlData),
),
_creater(),
],
),
),
],
),
);
}
}