opt: control bar height
This commit is contained in:
@ -1068,13 +1068,10 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
);
|
);
|
||||||
final bool isLandscape =
|
final bool isLandscape =
|
||||||
MediaQuery.of(context).orientation == Orientation.landscape;
|
MediaQuery.of(context).orientation == Orientation.landscape;
|
||||||
return AppBar(
|
return Padding(
|
||||||
backgroundColor: Colors.transparent,
|
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||||
foregroundColor: Colors.white,
|
child: Column(
|
||||||
primary: false,
|
mainAxisSize: MainAxisSize.min,
|
||||||
automaticallyImplyLeading: false,
|
|
||||||
titleSpacing: 14,
|
|
||||||
title: Column(
|
|
||||||
children: [
|
children: [
|
||||||
if (isFullScreen.value && isLandscape) ...[
|
if (isFullScreen.value && isLandscape) ...[
|
||||||
Row(
|
Row(
|
||||||
|
|||||||
@ -443,7 +443,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
);
|
);
|
||||||
return Stack(
|
return ClipRect(
|
||||||
|
child: Stack(
|
||||||
fit: StackFit.passthrough,
|
fit: StackFit.passthrough,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Obx(
|
Obx(
|
||||||
@ -719,7 +720,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
_brightnessValue.value - delta / level;
|
_brightnessValue.value - delta / level;
|
||||||
final double result = brightness.clamp(0.0, 1.0);
|
final double result = brightness.clamp(0.0, 1.0);
|
||||||
setBrightness(result);
|
setBrightness(result);
|
||||||
} else if (isUsingFullScreenGestures(tapPosition, sectionWidth)) {
|
} else if (isUsingFullScreenGestures(
|
||||||
|
tapPosition, sectionWidth)) {
|
||||||
// 全屏
|
// 全屏
|
||||||
final double dy = details.delta.dy;
|
final double dy = details.delta.dy;
|
||||||
const double threshold = 7.0; // 滑动阈值
|
const double threshold = 7.0; // 滑动阈值
|
||||||
@ -768,9 +770,9 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
() => Column(
|
() => Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
if (widget.headerControl != null || _.headerControl != null) ...[
|
if (widget.headerControl != null ||
|
||||||
|
_.headerControl != null) ...[
|
||||||
Flexible(
|
Flexible(
|
||||||
child: ClipRect(
|
|
||||||
child: AppBarAni(
|
child: AppBarAni(
|
||||||
controller: animationController,
|
controller: animationController,
|
||||||
visible: !_.controlsLock.value && _.showControls.value,
|
visible: !_.controlsLock.value && _.showControls.value,
|
||||||
@ -778,13 +780,11 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
child: widget.headerControl ?? _.headerControl!,
|
child: widget.headerControl ?? _.headerControl!,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
] else ...[
|
] else ...[
|
||||||
const SizedBox.shrink()
|
const SizedBox.shrink()
|
||||||
],
|
],
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: _.videoType == 'live' ? 0 : 1,
|
flex: _.videoType == 'live' ? 0 : 1,
|
||||||
child: ClipRect(
|
|
||||||
child: AppBarAni(
|
child: AppBarAni(
|
||||||
controller: animationController,
|
controller: animationController,
|
||||||
visible: !_.controlsLock.value && _.showControls.value,
|
visible: !_.controlsLock.value && _.showControls.value,
|
||||||
@ -797,7 +797,6 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -932,6 +931,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
onSubmittedcb: _handleSubmittedCallback,
|
onSubmittedcb: _handleSubmittedCallback,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,19 +18,18 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Padding(
|
||||||
color: Colors.transparent,
|
|
||||||
height: 90,
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 18),
|
padding: const EdgeInsets.symmetric(horizontal: 18),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(7, 0, 7, 6),
|
padding: const EdgeInsets.fromLTRB(7, 0, 7, 4),
|
||||||
child: ProgressBarWidget(controller: controller!),
|
child: ProgressBarWidget(controller: controller!),
|
||||||
),
|
),
|
||||||
Row(children: buildBottomControl!),
|
Row(children: buildBottomControl!),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 6),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user