@@ -19,12 +19,15 @@ void main() {
19
19
20
20
setUp (() {
21
21
VideoPlayerPlatform .instance = VideoPlayerPlugin ();
22
- textureId = VideoPlayerPlatform .instance.create (
23
- DataSource (
24
- sourceType: DataSourceType .network,
25
- uri:
26
- 'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4' ),
27
- ).then ((textureId) => textureId! );
22
+ textureId = VideoPlayerPlatform .instance
23
+ .create (
24
+ DataSource (
25
+ sourceType: DataSourceType .network,
26
+ uri:
27
+ 'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4' ,
28
+ ),
29
+ )
30
+ .then ((textureId) => textureId! );
28
31
});
29
32
30
33
testWidgets ('can init' , (WidgetTester tester) async {
@@ -71,7 +74,9 @@ void main() {
71
74
72
75
testWidgets ('can set looping' , (WidgetTester tester) async {
73
76
expect (
74
- VideoPlayerPlatform .instance.setLooping (await textureId, true ), completes);
77
+ VideoPlayerPlatform .instance.setLooping (await textureId, true ),
78
+ completes,
79
+ );
75
80
});
76
81
77
82
testWidgets ('can play' , (WidgetTester tester) async {
@@ -80,7 +85,8 @@ void main() {
80
85
expect (VideoPlayerPlatform .instance.play (await textureId), completes);
81
86
});
82
87
83
- testWidgets ('throws PlatformException when playing bad media' , (WidgetTester tester) async {
88
+ testWidgets ('throws PlatformException when playing bad media' ,
89
+ (WidgetTester tester) async {
84
90
int videoPlayerId = (await VideoPlayerPlatform .instance.create (
85
91
DataSource (
86
92
sourceType: DataSourceType .network,
@@ -105,7 +111,10 @@ void main() {
105
111
});
106
112
107
113
testWidgets ('can set volume' , (WidgetTester tester) async {
108
- expect (VideoPlayerPlatform .instance.setVolume (await textureId, 0.8 ), completes);
114
+ expect (
115
+ VideoPlayerPlatform .instance.setVolume (await textureId, 0.8 ),
116
+ completes,
117
+ );
109
118
});
110
119
111
120
testWidgets ('can set playback speed' , (WidgetTester tester) async {
@@ -117,8 +126,12 @@ void main() {
117
126
118
127
testWidgets ('can seek to position' , (WidgetTester tester) async {
119
128
expect (
120
- VideoPlayerPlatform .instance.seekTo (await textureId, Duration (seconds: 1 )),
121
- completes);
129
+ VideoPlayerPlatform .instance.seekTo (
130
+ await textureId,
131
+ Duration (seconds: 1 ),
132
+ ),
133
+ completes,
134
+ );
122
135
});
123
136
124
137
testWidgets ('can get position' , (WidgetTester tester) async {
0 commit comments