fix(player): 收敛播放入口缓冲提示
This commit is contained in:
1 parent
f302b396b7
commit
7ad4681049
12 files changed
+218
-42
No files matched your search
@@ -17,21 +17,26 @@ void main() {
|
||||
expect(seekPositionForFraction(1, duration), lessThan(duration));
|
||||
});
|
||||
|
||||
testWidgets('should_show_loading_track_when_controller_is_missing', (
|
||||
testWidgets('should_show_inactive_track_when_video_is_not_initialized', (
|
||||
tester,
|
||||
) async {
|
||||
final video = ValueNotifier<VideoPlayerValue>(
|
||||
const VideoPlayerValue.uninitialized(),
|
||||
);
|
||||
addTearDown(video.dispose);
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: SeekProgressBar(
|
||||
valueListenable: null,
|
||||
valueListenable: video,
|
||||
semanticsLabel: 'Seek video',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(find.byKey(const Key('progress-loading')), findsOneWidget);
|
||||
expect(find.byKey(const Key('progress-loading')), findsNothing);
|
||||
expect(find.byKey(const Key('progress-inactive')), findsOneWidget);
|
||||
expect(find.byType(Slider), findsNothing);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user