公告详情页

hmxc
张萌 4 years ago
parent 79c161bab9
commit 28fd8af662

@ -1,11 +1,13 @@
import 'dart:ui'; import 'dart:ui';
import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/ui/home/announcement/anouncement_details.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_ui/aku_ui.dart'; import 'package:aku_ui/aku_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community_manager/const/resource.dart'; import 'package:aku_community_manager/const/resource.dart';
import 'package:get/get.dart';
class AnouncementCard { class AnouncementCard {
String title; String title;
@ -24,12 +26,24 @@ class AllAnouncement extends StatefulWidget {
} }
class _AllAnouncementState extends State<AllAnouncement> { class _AllAnouncementState extends State<AllAnouncement> {
Widget _anounceCard(String title, String date,) { Widget _anounceCard(
String title,
String date,
) {
return Column( return Column(
children: [ children: [
AkuButton( AkuButton(
onPressed: (){}, onPressed: () {
// color: Color(0xFFFFFFFF), Get.to(AnouncementDetails(
title: title,
date: date,
body: '''
201610177108
''',
));
},
child: Container( child: Container(
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
width: double.infinity, width: double.infinity,
@ -59,7 +73,10 @@ class _AllAnouncementState extends State<AllAnouncement> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(title,style: AppStyle().primaryStyle,), Text(
title,
style: AppStyle().primaryStyle,
),
SizedBox(height: 12.w), SizedBox(height: 12.w),
Row( Row(
children: [ children: [
@ -81,18 +98,23 @@ class _AllAnouncementState extends State<AllAnouncement> {
), ),
), ),
), ),
SizedBox(height: 16.w,), SizedBox(
height: 16.w,
),
], ],
); );
} }
Widget _anouncementList(String date, List<AnouncementCard> cards,) { Widget _anouncementList(
String date,
List<AnouncementCard> cards,
) {
return Column( return Column(
children: [ children: [
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
width: double.infinity, width: double.infinity,
height: 24.w + 33.w, height: 48.w + 33.w,
child: Text( child: Text(
date, date,
style: AppStyle().minorStyle, style: AppStyle().minorStyle,
@ -111,13 +133,22 @@ class _AllAnouncementState extends State<AllAnouncement> {
return AkuScaffold( return AkuScaffold(
title: '全部公告', title: '全部公告',
body: ListView( body: ListView(
padding: EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w), padding: EdgeInsets.only(left: 32.w, right: 32.w),
children: [ children: [
_anouncementList('2020-10-22', [ _anouncementList('2020-10-22', [
AnouncementCard('关于国庆放假的通知和安排', '2020-10-22 10:00',), AnouncementCard(
AnouncementCard('关于绿化组人员调动通知', '2020-10-22 11:00',), '关于国庆放假的通知和安排',
'2020-10-22 10:00',
),
AnouncementCard(
'关于绿化组人员调动通知',
'2020-10-22 11:00',
),
]),
_anouncementList('2020-10-20', [
AnouncementCard('关于中秋放假通知与工作安排', '2020-10-22 10:00'),
AnouncementCard('疫情期间对大家的表扬和鼓励', '2020-10-22 11:00'),
]), ]),
_anouncementList('2020-10-20', [])
], ],
), ),
); );

@ -0,0 +1,65 @@
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class AnouncementDetails extends StatelessWidget {
final String title;
final String date;
final String body;
const AnouncementDetails({
Key key,
@required this.title,
@required this.date,
@required this.body,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '活动详情',
body: Container(
color: Color(0xFFFFFFFF),
padding: EdgeInsets.only(top: 24.w, left: 33.w, right: 33.w),
width: double.infinity,
height: double.infinity,
child: Column(mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
title,
style: AppStyle().barTitleStyle,
),
SizedBox(
height: 16.w,
),
Text(body,
style:
TextStyle(color: AppStyle.primaryTextColor, fontSize: 28.sp)),
SizedBox(
height: 120.w,
),
Row(
children: [
Spacer(),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('深圳永成物业有限公司', style: AppStyle().primaryStyle),
SizedBox(
height: 4.w,
),
Text(date, style: AppStyle().primaryStyle),
],
),
SizedBox(
width: 56.w - 31.w,
),
],
),
]),
),
);
}
}
Loading…
Cancel
Save