mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-19 19:01:24 +08:00
@@ -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,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user