新增"更多"功能

This commit is contained in:
jasonchenwork 2025-06-03 13:01:33 +08:00
parent 8fe8e7113c
commit a6123b506f
2 changed files with 45 additions and 10 deletions

View File

@ -5,6 +5,7 @@ import 'package:communityapp/visitor.dart';
import 'package:flutter/material.dart';
import 'reapair.dart';
import 'activity.dart';
import 'announcement.dart';
class HomeContentPage extends StatelessWidget {
const HomeContentPage({super.key});
@ -59,7 +60,7 @@ class HomeContentPage extends StatelessWidget {
body: SingleChildScrollView(
child: Column(
children: [
_announcementSection(),
_announcementSection(context),
_quickMenuSection(context),
_adCarousel(),
_marqueeNotice(),
@ -71,21 +72,56 @@ class HomeContentPage extends StatelessWidget {
}
// 📢
static Widget _announcementSection() {
static Widget _announcementSection(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'📢 重要公告',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
Row(
children: [
const Text(
'📢 重要公告',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const Spacer(),
TextButton(
onPressed: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (_) => const AnnouncementWrapper(),
);
},
style: OutlinedButton.styleFrom(
foregroundColor: Colors.blue,
side: const BorderSide(color: Colors.blue), //
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20), //
),
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 6,
), //
minimumSize: const Size(0, 0), //
tapTargetSize: MaterialTapTargetSize.shrinkWrap, //
),
child: const Text(
'更多',
style: TextStyle(fontSize: 14), //
),
),
],
),
const SizedBox(height: 8),
Card(
child: ListTile(
title: const Text('4/20 水塔清洗通知'),
subtitle: const Text('本週六早上9:00至下午3:00進行清洗請提前儲水。'),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Card(
child: ListTile(
title: const Text('4/20 水塔清洗通知'),
subtitle: const Text('本週六早上9:00至下午3:00進行清洗請提前儲水。'),
),
),
),
],

View File

@ -157,7 +157,6 @@ class PersonalPage extends StatelessWidget {
right: 0,
child: OutlinedButton(
onPressed: () {
// TODO:
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const FeedbackPage()),