diff --git a/lib/generated_plugin_registrant.dart b/lib/generated_plugin_registrant.dart index 8e0b1cb0..222a4e7a 100644 --- a/lib/generated_plugin_registrant.dart +++ b/lib/generated_plugin_registrant.dart @@ -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); diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 6036afd7..1420116b 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -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'; diff --git a/lib/ui/home/public_infomation/public_infomation_card.dart b/lib/ui/home/public_infomation/public_infomation_card.dart new file mode 100644 index 00000000..9fb24f99 --- /dev/null +++ b/lib/ui/home/public_infomation/public_infomation_card.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(), + ), + ], + ), + ), + ); + } +} diff --git a/lib/ui/community/public_infomation_page.dart b/lib/ui/home/public_infomation/public_infomation_page.dart similarity index 88% rename from lib/ui/community/public_infomation_page.dart rename to lib/ui/home/public_infomation/public_infomation_page.dart index 19e00d96..06556657 100644 --- a/lib/ui/community/public_infomation_page.dart +++ b/lib/ui/home/public_infomation/public_infomation_page.dart @@ -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 return BeeScaffold( title: '公共资讯', appBarBottom: BeeTabBar(controller: _tabController, tabs: pubTabs), + body: PublicInfomationView(), ); } } diff --git a/lib/ui/home/public_infomation/public_infomation_view.dart b/lib/ui/home/public_infomation/public_infomation_view.dart new file mode 100644 index 00000000..fba43b6d --- /dev/null +++ b/lib/ui/home/public_infomation/public_infomation_view.dart @@ -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 { + @override + Widget build(BuildContext context) { + return ListView.separated( + padding: EdgeInsets.symmetric(vertical: 24.w), + itemBuilder: (context, index) { + return PublicInfomationCard(); + }, + separatorBuilder: (_, __) => 24.hb, + itemCount: 100, + ); + } +}