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, : Colors.black,
systemOverlayStyle: Platform.isAndroid toolbarHeight: 0,
? shouldShow systemOverlayStyle: Platform.isAndroid
? null ? SystemUiOverlayStyle(
: SystemUiOverlayStyle( statusBarIconBrightness: flag && scrollRatio >= 0.5
statusBarIconBrightness: Brightness.light, ? themeData.brightness.reverse
systemNavigationBarIconBrightness: : Brightness.light,
themeData.brightness.reverse, systemNavigationBarIconBrightness:
) themeData.brightness.reverse,
: null, )
), : 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,
),
],
); );
}, },
), ),