opt video statusbar

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-10 13:33:59 +08:00
parent 68724c8a9e
commit b553e7554d

View File

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