일단 잡까지 되는것 저장

This commit is contained in:
girinb
2025-07-11 16:46:23 +09:00
parent 42453abe41
commit 7e56c68827
7 changed files with 265 additions and 183 deletions

View File

@@ -24,7 +24,6 @@ class _YoutubePlayerPageState extends State<YoutubePlayerPage> {
String _videoTitle = 'YouTube Video';
final int _currentBottomNavIndex = 0;
bool _isSystemUiVisible = true;
bool _isLoading = true; // 로딩 상태 추가
bool _isFullScreen = false;
@override
@@ -124,18 +123,6 @@ class _YoutubePlayerPageState extends State<YoutubePlayerPage> {
}
}
void _onNotificationTapped() {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('알림 아이콘 클릭됨')),
);
}
void _onProfileTapped() {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('프로필 아이콘 클릭됨')),
);
}
void _onBottomNavItemTapped(int index) {
if (_currentBottomNavIndex == index && index != 0) return;
if (index == 0) {
@@ -195,9 +182,18 @@ class _YoutubePlayerPageState extends State<YoutubePlayerPage> {
Widget build(BuildContext context) {
final bool isFullScreen = _controller?.value.isFullScreen ?? false;
// <<< WillPopScope로 Scaffold를 감싸서 뒤로가기 이벤트 가로채기 >>>
return WillPopScope(
onWillPop: _onWillPop,
// <<< PopScope로 Scaffold를 감싸서 뒤로가기 이벤트 가로채기 >>>
return PopScope(
canPop: false,
onPopInvoked: (didPop) async {
if (didPop) {
return;
}
final bool shouldPop = await _onWillPop();
if (shouldPop) {
Navigator.of(context).pop();
}
},
child: Scaffold(
extendBodyBehindAppBar: isFullScreen,