12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- import 'package:eitc_erm_app/utils/Constants.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter_html/flutter_html.dart';
- import 'bean/notice_manage_list.dart';
- void main() {
- WidgetsFlutterBinding.ensureInitialized();
- runApp(NoticeDetail("", 0));
- }
- NoticeManageList mNoticeManageList = new NoticeManageList();
- int mWhich = 0;
- class NoticeDetail extends StatefulWidget {
- NoticeDetail(noticeManageList, which) {
- mNoticeManageList = noticeManageList;
- mWhich = which;
- }
- @override
- State<StatefulWidget> createState() => NoticeDetailState();
- }
- class NoticeDetailState extends State<NoticeDetail> {
- @override
- void initState() {
- super.initState();
- }
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: const Text('公告详情',
- style: TextStyle(
- color: Colors.white,
- )),
- centerTitle: true,
- elevation: 0.5,
- backgroundColor: Global.StatusBarColor,
- leading: IconButton(
- tooltip: '返回上一页',
- icon: const Icon(
- Icons.arrow_back_ios,
- color: Colors.white,
- ),
- onPressed: () {
- Navigator.of(context).pop();
- //_nextPage(-1);
- },
- ),
- ),
- body: Padding(
- padding: const EdgeInsets.all(10),
- child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
- Text(
- mNoticeManageList.data![mWhich].noticeTitle ?? "",
- style: Theme.of(context).textTheme.titleLarge,
- ),
- Align(
- alignment: Alignment.centerRight,
- child: Text(
- mNoticeManageList.data![mWhich].noticeStartTime ?? "",
- style: Theme.of(context)
- .textTheme
- .bodySmall
- ?.copyWith(color: Colors.grey),
- ),
- ),
- const SizedBox(
- height: 5,
- ),
- Html(
- data: mNoticeManageList.data![mWhich].noticeContent,
- ),
- ]),
- ),
- );
- }
- }
|