新增"更多"功能
This commit is contained in:
parent
8fe8e7113c
commit
a6123b506f
@ -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進行清洗,請提前儲水。'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -157,7 +157,6 @@ class PersonalPage extends StatelessWidget {
|
||||
right: 0,
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
// TODO: 意見箱按鈕
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const FeedbackPage()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user