이벤트 개발완료
This commit is contained in:
+28
-32
@@ -15,7 +15,7 @@ import 'screens/club/dashboard_screen.dart';
|
||||
import 'screens/club/members_screen.dart';
|
||||
import 'screens/club/events_screen.dart';
|
||||
import 'screens/club/club_settings_screen.dart';
|
||||
import 'screens/score/club_statistics_screen.dart';
|
||||
// import 'screens/score/club_statistics_screen.dart';
|
||||
import 'widgets/dialog_actions.dart';
|
||||
|
||||
// 전역 네비게이터 키 (인증 오류 처리용)
|
||||
@@ -171,12 +171,11 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
int _selectedIndex = 0;
|
||||
bool _isInit = false;
|
||||
|
||||
static final List<Widget> _widgetOptions = <Widget>[
|
||||
const DashboardScreen(),
|
||||
const MembersScreen(),
|
||||
const EventsScreen(),
|
||||
const ClubStatisticsScreen(),
|
||||
const ProfileScreen(),
|
||||
List<Widget> get _widgetOptions => const <Widget>[
|
||||
DashboardScreen(),
|
||||
MembersScreen(),
|
||||
EventsScreen(),
|
||||
ProfileScreen(),
|
||||
];
|
||||
|
||||
void _onItemTapped(int index) {
|
||||
@@ -367,28 +366,29 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
},
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.notifications),
|
||||
onPressed: () async {
|
||||
// 알림 권한 요청
|
||||
final notificationService = NotificationService();
|
||||
final messenger = ScaffoldMessenger.of(context);
|
||||
final hasPermission = await notificationService.requestPermission();
|
||||
if (hasPermission) {
|
||||
if (context.mounted) {
|
||||
messenger.showSnackBar(
|
||||
const SnackBar(content: Text('알림 권한이 허용되었습니다')),
|
||||
);
|
||||
if (_selectedIndex == 0)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.notifications),
|
||||
onPressed: () async {
|
||||
// 알림 권한 요청 (대시보드에서만 노출)
|
||||
final notificationService = NotificationService();
|
||||
final messenger = ScaffoldMessenger.of(context);
|
||||
final hasPermission = await notificationService.requestPermission();
|
||||
if (hasPermission) {
|
||||
if (context.mounted) {
|
||||
messenger.showSnackBar(
|
||||
const SnackBar(content: Text('알림 권한이 허용되었습니다')),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
messenger.showSnackBar(
|
||||
const SnackBar(content: Text('알림 권한이 거부되었습니다. 설정에서 권한을 허용해주세요')),
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
messenger.showSnackBar(
|
||||
const SnackBar(content: Text('알림 권한이 거부되었습니다. 설정에서 권한을 허용해주세요')),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: _widgetOptions.elementAt(_selectedIndex),
|
||||
@@ -407,10 +407,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
icon: Icon(Icons.event),
|
||||
label: '이벤트',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.score),
|
||||
label: '통계',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.person),
|
||||
label: '프로필',
|
||||
|
||||
Reference in New Issue
Block a user