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(
() {
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,
);
},
),