tdd 진행

This commit is contained in:
2025-08-09 03:09:17 +09:00
parent ed8c7eacba
commit 6033d59590
74 changed files with 17804 additions and 395 deletions
+22 -5
View File
@@ -7,6 +7,7 @@ import 'services/club_service.dart';
import 'services/member_service.dart';
import 'services/event_service.dart';
import 'services/score_service.dart';
import 'services/notification_service.dart';
import 'screens/auth/login_screen.dart';
import 'screens/auth/profile_screen.dart';
import 'screens/club/dashboard_screen.dart';
@@ -20,6 +21,11 @@ final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// 알림 서비스 초기화
final notificationService = NotificationService();
await notificationService.initialize();
runApp(const MyApp());
}
@@ -299,11 +305,22 @@ class _HomeScreenState extends State<HomeScreen> {
actions: [
IconButton(
icon: const Icon(Icons.notifications),
onPressed: () {
// 알림 기능 (추후 구현)
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('알림 기능은 아직 개발 중입니다')),
);
onPressed: () async {
// 알림 권한 요청
final notificationService = NotificationService();
final hasPermission = await notificationService.requestPermission();
if (context.mounted) {
if (hasPermission) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('알림 권한이 허용되었습니다')),
);
} else {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('알림 권한이 거부되었습니다. 설정에서 권한을 허용해주세요')),
);
}
}
},
),
],