@ -302,7 +302,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
return <Widget>[
|
return <Widget>[
|
||||||
Obx(() => SliverAppBar(
|
Obx(() => SliverAppBar(
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
pinned: false,
|
// 假装使用一个非空变量,避免Obx检测不到而罢工
|
||||||
|
pinned: videoDetailController
|
||||||
|
.autoPlay.value ^ false ^ videoDetailController
|
||||||
|
.autoPlay.value,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
scrolledUnderElevation: 0,
|
scrolledUnderElevation: 0,
|
||||||
forceElevated: innerBoxIsScrolled,
|
forceElevated: innerBoxIsScrolled,
|
||||||
|
@ -3,14 +3,15 @@ enum BtmProgresBehavior {
|
|||||||
alwaysShow,
|
alwaysShow,
|
||||||
alwaysHide,
|
alwaysHide,
|
||||||
onlyShowFullScreen,
|
onlyShowFullScreen,
|
||||||
|
onlyHideFullScreen,
|
||||||
}
|
}
|
||||||
|
|
||||||
extension BtmProgresBehaviorDesc on BtmProgresBehavior {
|
extension BtmProgresBehaviorDesc on BtmProgresBehavior {
|
||||||
String get description => ['始终展示', '始终隐藏', '仅全屏时展示'][index];
|
String get description => ['始终展示', '始终隐藏', '仅全屏时展示', '仅全屏时隐藏'][index];
|
||||||
}
|
}
|
||||||
|
|
||||||
extension BtmProgresBehaviorCode on BtmProgresBehavior {
|
extension BtmProgresBehaviorCode on BtmProgresBehavior {
|
||||||
static final List<int> _codeList = [0, 1, 2];
|
static final List<int> _codeList = [0, 1, 2, 3];
|
||||||
int get code => _codeList[index];
|
int get code => _codeList[index];
|
||||||
|
|
||||||
static BtmProgresBehavior? fromCode(int code) {
|
static BtmProgresBehavior? fromCode(int code) {
|
||||||
|
@ -610,6 +610,10 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
BtmProgresBehavior.onlyShowFullScreen.code &&
|
BtmProgresBehavior.onlyShowFullScreen.code &&
|
||||||
!_.isFullScreen.value) {
|
!_.isFullScreen.value) {
|
||||||
return Container();
|
return Container();
|
||||||
|
} else if (defaultBtmProgressBehavior ==
|
||||||
|
BtmProgresBehavior.onlyHideFullScreen.code &&
|
||||||
|
_.isFullScreen.value) {
|
||||||
|
return Container();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_.videoType.value == 'live') {
|
if (_.videoType.value == 'live') {
|
||||||
|
Reference in New Issue
Block a user