mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 更换已废弃的onPopInvoked为onPopInvokedWithResult
This commit is contained in:
@@ -205,7 +205,7 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
|
|||||||
),
|
),
|
||||||
PopScope(
|
PopScope(
|
||||||
canPop: plPlayerController?.isFullScreen.value != true,
|
canPop: plPlayerController?.isFullScreen.value != true,
|
||||||
onPopInvoked: (bool didPop) {
|
onPopInvokedWithResult: (bool didPop, Object? result) {
|
||||||
if (plPlayerController?.isFullScreen.value == true) {
|
if (plPlayerController?.isFullScreen.value == true) {
|
||||||
plPlayerController!.triggerFullScreen(status: false);
|
plPlayerController!.triggerFullScreen(status: false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class _MainAppState extends State<MainApp> with SingleTickerProviderStateMixin {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: false,
|
canPop: false,
|
||||||
onPopInvoked: (bool didPop) async {
|
onPopInvokedWithResult: (bool didPop, Object? result) async {
|
||||||
_mainController.onBackPressed(context);
|
_mainController.onBackPressed(context);
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
(horizontalScreen ||
|
(horizontalScreen ||
|
||||||
MediaQuery.of(context).orientation ==
|
MediaQuery.of(context).orientation ==
|
||||||
Orientation.portrait),
|
Orientation.portrait),
|
||||||
onPopInvoked: (bool didPop) {
|
onPopInvokedWithResult: (bool didPop, Object? result) {
|
||||||
if (isFullScreen.value == true) {
|
if (isFullScreen.value == true) {
|
||||||
plPlayerController!
|
plPlayerController!
|
||||||
.triggerFullScreen(status: false);
|
.triggerFullScreen(status: false);
|
||||||
@@ -777,7 +777,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
width: isFullScreen.value == true ? context.width : videoWidth,
|
width: isFullScreen.value == true ? context.width : videoWidth,
|
||||||
child: PopScope(
|
child: PopScope(
|
||||||
canPop: isFullScreen.value != true,
|
canPop: isFullScreen.value != true,
|
||||||
onPopInvoked: (bool didPop) {
|
onPopInvokedWithResult: (bool didPop, Object? result) {
|
||||||
if (isFullScreen.value == true) {
|
if (isFullScreen.value == true) {
|
||||||
plPlayerController!.triggerFullScreen(status: false);
|
plPlayerController!.triggerFullScreen(status: false);
|
||||||
}
|
}
|
||||||
@@ -878,7 +878,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
: videoHeight,
|
: videoHeight,
|
||||||
child: PopScope(
|
child: PopScope(
|
||||||
canPop: isFullScreen.value != true,
|
canPop: isFullScreen.value != true,
|
||||||
onPopInvoked: (bool didPop) {
|
onPopInvokedWithResult: (bool didPop, Object? result) {
|
||||||
if (isFullScreen.value == true) {
|
if (isFullScreen.value == true) {
|
||||||
plPlayerController!.triggerFullScreen(status: false);
|
plPlayerController!.triggerFullScreen(status: false);
|
||||||
}
|
}
|
||||||
@@ -975,7 +975,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
width: isFullScreen.value == true ? context.width : videoWidth,
|
width: isFullScreen.value == true ? context.width : videoWidth,
|
||||||
child: PopScope(
|
child: PopScope(
|
||||||
canPop: isFullScreen.value != true,
|
canPop: isFullScreen.value != true,
|
||||||
onPopInvoked: (bool didPop) {
|
onPopInvokedWithResult: (bool didPop, Object? result) {
|
||||||
if (isFullScreen.value == true) {
|
if (isFullScreen.value == true) {
|
||||||
plPlayerController!.triggerFullScreen(status: false);
|
plPlayerController!.triggerFullScreen(status: false);
|
||||||
}
|
}
|
||||||
@@ -1079,7 +1079,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
isFullScreen.value == true ? context.height : videoHeight,
|
isFullScreen.value == true ? context.height : videoHeight,
|
||||||
child: PopScope(
|
child: PopScope(
|
||||||
canPop: isFullScreen.value != true,
|
canPop: isFullScreen.value != true,
|
||||||
onPopInvoked: (bool didPop) {
|
onPopInvokedWithResult: (bool didPop, Object? result) {
|
||||||
if (isFullScreen.value == true) {
|
if (isFullScreen.value == true) {
|
||||||
plPlayerController!.triggerFullScreen(status: false);
|
plPlayerController!.triggerFullScreen(status: false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user