@@ -106,6 +106,13 @@ class _FakeClosedCaptionFile extends ClosedCaptionFile {
106
106
}
107
107
108
108
void main () {
109
+ late FakeVideoPlayerPlatform fakeVideoPlayerPlatform;
110
+
111
+ setUp (() {
112
+ fakeVideoPlayerPlatform = FakeVideoPlayerPlatform ();
113
+ VideoPlayerPlatform .instance = fakeVideoPlayerPlatform;
114
+ });
115
+
109
116
void verifyPlayStateRespondsToLifecycle (
110
117
VideoPlayerController controller, {
111
118
required bool shouldPlayInBackground,
@@ -235,13 +242,6 @@ void main() {
235
242
});
236
243
237
244
group ('VideoPlayerController' , () {
238
- late FakeVideoPlayerPlatform fakeVideoPlayerPlatform;
239
-
240
- setUp (() {
241
- fakeVideoPlayerPlatform = FakeVideoPlayerPlatform ();
242
- VideoPlayerPlatform .instance = fakeVideoPlayerPlatform;
243
- });
244
-
245
245
group ('initialize' , () {
246
246
test ('started app lifecycle observing' , () async {
247
247
final VideoPlayerController controller = VideoPlayerController .network (
@@ -1015,13 +1015,6 @@ void main() {
1015
1015
});
1016
1016
1017
1017
group ('VideoPlayerOptions' , () {
1018
- late FakeVideoPlayerPlatform fakeVideoPlayerPlatform;
1019
-
1020
- setUp (() {
1021
- fakeVideoPlayerPlatform = FakeVideoPlayerPlatform ();
1022
- VideoPlayerPlatform .instance = fakeVideoPlayerPlatform;
1023
- });
1024
-
1025
1018
test ('setMixWithOthers' , () async {
1026
1019
final VideoPlayerController controller = VideoPlayerController .network (
1027
1020
'https://127.0.0.1' ,
@@ -1160,6 +1153,11 @@ class FakeVideoPlayerPlatform extends VideoPlayerPlatform {
1160
1153
Future <void > setMixWithOthers (bool mixWithOthers) async {
1161
1154
calls.add ('setMixWithOthers' );
1162
1155
}
1156
+
1157
+ @override
1158
+ Widget buildView (int textureId) {
1159
+ return Texture (textureId: textureId);
1160
+ }
1163
1161
}
1164
1162
1165
1163
/// This allows a value of type T or T? to be treated as a value of type T?.
0 commit comments