Skip to content

Commit 342df89

Browse files
committed
Fix fwfh_chewie backward compatible
1 parent 8c9b2b3 commit 342df89

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

packages/fwfh_chewie/test/mock_video_player_platform.dart

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,33 @@ class _FakeVideoPlayerPlatform extends Fake
2020
}
2121

2222
@override
23-
Widget buildViewWithOptions(VideoViewOptions options) {
23+
Widget buildView(int textureId) {
24+
// TODO: remove this method when we bump chewie minimum version
2425
return const Placeholder();
2526
}
2627

2728
@override
28-
Future<int?> createWithOptions(VideoCreationOptions options) async {
29+
// TODO: remove lint ignore when we bump chewie minimum version
30+
// ignore: type_annotate_public_apis
31+
Widget buildViewWithOptions(options) {
32+
return const Placeholder();
33+
}
34+
35+
@override
36+
Future<int?> create(DataSource dataSource) async {
37+
final textureId = _nextTextureId++;
38+
uris[textureId] = dataSource.uri;
39+
return textureId;
40+
}
41+
42+
@override
43+
// TODO: remove lint ignore when we bump chewie minimum version
44+
// ignore: type_annotate_public_apis
45+
Future<int?> createWithOptions(options) async {
2946
final textureId = _nextTextureId++;
30-
uris[textureId] = options.dataSource.uri;
47+
// TODO: remove lint ignore when we bump chewie minimum version
48+
// ignore: unnecessary_cast
49+
uris[textureId] = options.dataSource.uri as String?;
3150
return textureId;
3251
}
3352

0 commit comments

Comments
 (0)