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

清晰度侧边栏溢出裁剪

上级 82eec7f9
......@@ -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_top_bar_style.dart';
import 'package:gz_video_player_example/other_test_page.dart';
import 'package:gz_video_player_example/overflow_test_page.dart';
void main() {
runApp(const MyApp());
......@@ -578,7 +579,7 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> {
// "play_url": "https://mpv.videocc.net/8f38fa3352/c/8f38fa3352029c8ac2af1c90e3bb7cdc_2.mp4",
VideoDefinitionItem(
dataSource:
'https://mpv.videocc.net/8f38fa3352/c/8f38fa3352029c8ac2af1c90e3bb7cdc_1.mp4',
'https://mpv.videocc.net/8f38fa3352/c/8f38fa3352029c8ac2af1c90e3bb7cdc_1.mp4',
title: 'LD',
),
VideoDefinitionItem(
......@@ -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>
_controller.seekTo(position);
Future.delayed(const Duration(milliseconds: 1500), () {
_controller.setPlaybackSpeed(_speedItem.speed);
debugPrint(
'-----> playbackSpeed = ${_controller.value.playbackSpeed}');
// debugPrint(
// '-----> playbackSpeed = ${_controller.value.playbackSpeed}');
});
} else {
_controller.seekTo(position);
......
......@@ -100,19 +100,21 @@ class _VideoDefinitionSideBarState extends State<VideoDefinitionSideBar>
onTap: () {
_controller.reverse();
},
child: Align(
alignment: Alignment.centerRight,
child: SlideTransition(
position: _offsetAnimation,
child: Container(
width: width,
color: Colors.black.withOpacity(0.6),
alignment: Alignment.center,
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: _renderItems(),
child: ClipRRect(
child: Align(
alignment: Alignment.centerRight,
child: SlideTransition(
position: _offsetAnimation,
child: Container(
width: width,
color: Colors.black.withOpacity(0.6),
alignment: Alignment.center,
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: _renderItems(),
),
),
),
),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论