diff --git a/lib/pages/video/view.dart b/lib/pages/video/view.dart index 3668d154a..dc7307d94 100644 --- a/lib/pages/video/view.dart +++ b/lib/pages/video/view.dart @@ -520,41 +520,26 @@ class _VideoDetailPageVState extends State child: Obx( () { final scrollRatio = videoDetailController.scrollRatio.value; - bool shouldShow = - scrollRatio != 0 && - videoDetailController.scrollCtr.offset != 0 && - isPortrait; - return Stack( - clipBehavior: Clip.none, - children: [ - AppBar( - backgroundColor: Colors.black, - toolbarHeight: 0, - systemOverlayStyle: Platform.isAndroid - ? shouldShow - ? null - : SystemUiOverlayStyle( - statusBarIconBrightness: Brightness.light, - systemNavigationBarIconBrightness: - themeData.brightness.reverse, - ) - : null, - ), - if (shouldShow) - AppBar( - backgroundColor: themeData.colorScheme.surface - .withValues(alpha: scrollRatio), - toolbarHeight: 0, - systemOverlayStyle: Platform.isAndroid - ? SystemUiOverlayStyle( - statusBarIconBrightness: - themeData.brightness.reverse, - systemNavigationBarIconBrightness: - themeData.brightness.reverse, - ) - : null, - ), - ], + final flag = + isPortrait && videoDetailController.scrollCtr.offset != 0; + return AppBar( + backgroundColor: flag && scrollRatio > 0 + ? Color.lerp( + Colors.black, + themeData.colorScheme.surface, + scrollRatio, + ) + : Colors.black, + toolbarHeight: 0, + systemOverlayStyle: Platform.isAndroid + ? SystemUiOverlayStyle( + statusBarIconBrightness: flag && scrollRatio >= 0.5 + ? themeData.brightness.reverse + : Brightness.light, + systemNavigationBarIconBrightness: + themeData.brightness.reverse, + ) + : null, ); }, ),