From 078d9033b1df91d24aee6e0982df47e42069de0a Mon Sep 17 00:00:00 2001 From: orz12 Date: Sun, 8 Sep 2024 19:09:55 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E6=9B=B4=E6=8D=A2=E5=B7=B2=E5=BA=9F?= =?UTF-8?q?=E5=BC=83=E7=9A=84onPopInvoked=E4=B8=BAonPopInvokedWithResult?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/live_room/view.dart | 2 +- lib/pages/main/view.dart | 2 +- lib/pages/video/detail/view.dart | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart index 9f477b21..338fbdcc 100644 --- a/lib/pages/live_room/view.dart +++ b/lib/pages/live_room/view.dart @@ -205,7 +205,7 @@ class _LiveRoomPageState extends State { ), PopScope( canPop: plPlayerController?.isFullScreen.value != true, - onPopInvoked: (bool didPop) { + onPopInvokedWithResult: (bool didPop, Object? result) { if (plPlayerController?.isFullScreen.value == true) { plPlayerController!.triggerFullScreen(status: false); } diff --git a/lib/pages/main/view.dart b/lib/pages/main/view.dart index 0cbf00f8..1aade8f7 100644 --- a/lib/pages/main/view.dart +++ b/lib/pages/main/view.dart @@ -106,7 +106,7 @@ class _MainAppState extends State with SingleTickerProviderStateMixin { Widget build(BuildContext context) { return PopScope( canPop: false, - onPopInvoked: (bool didPop) async { + onPopInvokedWithResult: (bool didPop, Object? result) async { _mainController.onBackPressed(context); }, child: Scaffold( diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 469bb7f3..add0d0b2 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -650,7 +650,7 @@ class _VideoDetailPageState extends State (horizontalScreen || MediaQuery.of(context).orientation == Orientation.portrait), - onPopInvoked: (bool didPop) { + onPopInvokedWithResult: (bool didPop, Object? result) { if (isFullScreen.value == true) { plPlayerController! .triggerFullScreen(status: false); @@ -777,7 +777,7 @@ class _VideoDetailPageState extends State width: isFullScreen.value == true ? context.width : videoWidth, child: PopScope( canPop: isFullScreen.value != true, - onPopInvoked: (bool didPop) { + onPopInvokedWithResult: (bool didPop, Object? result) { if (isFullScreen.value == true) { plPlayerController!.triggerFullScreen(status: false); } @@ -878,7 +878,7 @@ class _VideoDetailPageState extends State : videoHeight, child: PopScope( canPop: isFullScreen.value != true, - onPopInvoked: (bool didPop) { + onPopInvokedWithResult: (bool didPop, Object? result) { if (isFullScreen.value == true) { plPlayerController!.triggerFullScreen(status: false); } @@ -975,7 +975,7 @@ class _VideoDetailPageState extends State width: isFullScreen.value == true ? context.width : videoWidth, child: PopScope( canPop: isFullScreen.value != true, - onPopInvoked: (bool didPop) { + onPopInvokedWithResult: (bool didPop, Object? result) { if (isFullScreen.value == true) { plPlayerController!.triggerFullScreen(status: false); } @@ -1079,7 +1079,7 @@ class _VideoDetailPageState extends State isFullScreen.value == true ? context.height : videoHeight, child: PopScope( canPop: isFullScreen.value != true, - onPopInvoked: (bool didPop) { + onPopInvokedWithResult: (bool didPop, Object? result) { if (isFullScreen.value == true) { plPlayerController!.triggerFullScreen(status: false); }