更新公共信息页面

hmxc
小赖 4 years ago
parent 43d3971561
commit fb423a7e61

@ -6,12 +6,13 @@
import 'package:device_info_plus_web/device_info_plus_web.dart';
import 'package:firebase_core_web/firebase_core_web.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
import 'package:image_picker_for_web/image_picker_for_web.dart';
import 'package:package_info_plus_web/package_info_plus_web.dart';
import 'package:shared_preferences_web/shared_preferences_web.dart';
import 'package:url_launcher_web/url_launcher_web.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
// ignore: public_member_api_docs
void registerPlugins(Registrar registrar) {
DeviceInfoPlusPlugin.registerWith(registrar);

@ -19,7 +19,7 @@ import 'package:aku_community/provider/app_provider.dart';
import 'package:aku_community/ui/community/activity/activity_card.dart';
import 'package:aku_community/ui/community/activity/activity_list_page.dart';
import 'package:aku_community/ui/community/community_func.dart';
import 'package:aku_community/ui/community/public_infomation_page.dart';
import 'package:aku_community/ui/home/public_infomation/public_infomation_page.dart';
import 'package:aku_community/ui/home/home_notification.dart';
import 'package:aku_community/ui/home/home_title.dart';
import 'package:aku_community/utils/headers.dart';

@ -0,0 +1,53 @@
import 'package:aku_community/base/base_style.dart';
import 'package:flutter/material.dart';
import 'package:aku_community/utils/headers.dart';
class PublicInfomationCard extends StatelessWidget {
const PublicInfomationCard({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialButton(
color: Colors.white,
elevation: 0,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onPressed: () {},
padding: EdgeInsets.zero,
child: Container(
height: 248.w,
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
child: Row(
children: [
Expanded(
child: Column(
children: [
Text('今日快讯|日本决定将核污水拍入海中,中方对此强势喊话日本考虑需谨慎'),
Spacer(),
DefaultTextStyle(
style: TextStyle(
color: ktextSubColor,
fontSize: 20.sp,
),
child: Row(
children: [
Text('测试'),
Spacer(),
Text('发布于 4-11 10:11'),
],
),
),
],
),
),
32.wb,
SizedBox(
width: 240.w,
height: 200.w,
child: Placeholder(),
),
],
),
),
);
}
}

@ -1,3 +1,4 @@
import 'package:aku_community/ui/home/public_infomation/public_infomation_view.dart';
import 'package:flutter/material.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
@ -25,6 +26,7 @@ class _PublicInfomationPageState extends State<PublicInfomationPage>
return BeeScaffold(
title: '公共资讯',
appBarBottom: BeeTabBar(controller: _tabController, tabs: pubTabs),
body: PublicInfomationView(),
);
}
}

@ -0,0 +1,24 @@
import 'package:aku_community/ui/home/public_infomation/public_infomation_card.dart';
import 'package:flutter/material.dart';
import 'package:aku_community/utils/headers.dart';
class PublicInfomationView extends StatefulWidget {
PublicInfomationView({Key? key}) : super(key: key);
@override
_PublicInfomationViewState createState() => _PublicInfomationViewState();
}
class _PublicInfomationViewState extends State<PublicInfomationView> {
@override
Widget build(BuildContext context) {
return ListView.separated(
padding: EdgeInsets.symmetric(vertical: 24.w),
itemBuilder: (context, index) {
return PublicInfomationCard();
},
separatorBuilder: (_, __) => 24.hb,
itemCount: 100,
);
}
}
Loading…
Cancel
Save