[video-player] upgraded video_player_interface to use pigeon #2617
[video-player] upgraded video_player_interface to use pigeon #2617
Conversation
2233d07
to
0e6a576
Compare
0e6a576
to
edd1067
Compare
edd1067
to
c6740f8
Compare
@cyanglaz Alternatively we could publish this as a whole different package if it makes getting through CI easier. This could be |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
int textureId; | ||
// ignore: unused_element | ||
Map<dynamic, dynamic> _toMap() { | ||
final Map<dynamic, dynamic> pigeonMap = <dynamic, dynamic>{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it is possible for pigeon to know the type of the parameters and generate the map with different params.
It's not necessary tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to change it to Map<String, dynamic>, i just haven't gotten around to it. I'm kind of stuck with what the standard codec supports.
'dev.flutter.pigeon.VideoPlayerApi.initialize', StandardMessageCodec()); | ||
|
||
final Map<dynamic, dynamic> replyMap = await channel.send(null); | ||
if (replyMap == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits:
can just be
if (xx) {
throw e1;
}
if (yy) {
throw e2;
}
and remove the noop else
'dev.flutter.pigeon.VideoPlayerApi.create', StandardMessageCodec()); | ||
|
||
final Map<dynamic, dynamic> replyMap = await channel.send(requestMap); | ||
if (replyMap == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits:
same here
if
throw
if
throw
return..
Landing red as is the protocol that was described to me by @amirh. Look at ecdeb4f to see this passing most CI except the following:
|
…#2617) * [video-player] upgraded video_player_interface to use pigeon
…#2617) * [video-player] upgraded video_player_interface to use pigeon
…#2617) * [video-player] upgraded video_player_interface to use pigeon
…#2617) * [video-player] upgraded video_player_interface to use pigeon
Description
Upgraded to use pigeon, child commit: #2544
Related Issues
Related: flutter/flutter#32930
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?