提交 e311c644 authored 作者: jungleiOS's avatar jungleiOS

清晰度侧边栏溢出裁剪

上级 82eec7f9
...@@ -12,6 +12,7 @@ import 'package:gz_video_player/video_style.dart'; ...@@ -12,6 +12,7 @@ import 'package:gz_video_player/video_style.dart';
import 'package:gz_video_player/video_subtitles.dart'; import 'package:gz_video_player/video_subtitles.dart';
import 'package:gz_video_player/video_top_bar_style.dart'; import 'package:gz_video_player/video_top_bar_style.dart';
import 'package:gz_video_player_example/other_test_page.dart'; import 'package:gz_video_player_example/other_test_page.dart';
import 'package:gz_video_player_example/overflow_test_page.dart';
void main() { void main() {
runApp(const MyApp()); runApp(const MyApp());
...@@ -594,6 +595,23 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> { ...@@ -594,6 +595,23 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> {
), ),
), ),
), ),
SliverToBoxAdapter(
child: Center(
child: CustomBtn(
title: 'overflow page',
onTap: () {
videoPlayerController?.pause();
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return const OverflowTestPage();
},
),
);
},
),
),
),
], ],
), ),
) )
......
import 'package:flutter/material.dart';
import 'package:gz_video_player/video.dart';
class OverflowTestPage extends StatelessWidget {
const OverflowTestPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('overflowTestPage'),
),
body: Container(
width: 300,
height: 200,
color: Colors.blue,
child: GZVideoPlayer(
dataSource:
'https://mpv.videocc.net/8f38fa3352/5/8f38fa3352cdb65e6773173ae8c767b5_1.mp4',
sourceType: DataSourceType.network,
),
),
);
}
}
...@@ -457,8 +457,8 @@ class GZVideoPlayerState extends State<GZVideoPlayer> ...@@ -457,8 +457,8 @@ class GZVideoPlayerState extends State<GZVideoPlayer>
_controller.seekTo(position); _controller.seekTo(position);
Future.delayed(const Duration(milliseconds: 1500), () { Future.delayed(const Duration(milliseconds: 1500), () {
_controller.setPlaybackSpeed(_speedItem.speed); _controller.setPlaybackSpeed(_speedItem.speed);
debugPrint( // debugPrint(
'-----> playbackSpeed = ${_controller.value.playbackSpeed}'); // '-----> playbackSpeed = ${_controller.value.playbackSpeed}');
}); });
} else { } else {
_controller.seekTo(position); _controller.seekTo(position);
......
...@@ -100,6 +100,7 @@ class _VideoDefinitionSideBarState extends State<VideoDefinitionSideBar> ...@@ -100,6 +100,7 @@ class _VideoDefinitionSideBarState extends State<VideoDefinitionSideBar>
onTap: () { onTap: () {
_controller.reverse(); _controller.reverse();
}, },
child: ClipRRect(
child: Align( child: Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: SlideTransition( child: SlideTransition(
...@@ -118,6 +119,7 @@ class _VideoDefinitionSideBarState extends State<VideoDefinitionSideBar> ...@@ -118,6 +119,7 @@ class _VideoDefinitionSideBarState extends State<VideoDefinitionSideBar>
), ),
), ),
), ),
),
); );
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论