fix: Incorrect progress updating for native player

This commit is contained in:
PartyDonut 2025-10-26 18:07:26 +01:00
parent fa61ce2e40
commit a3ccb6009c
6 changed files with 57 additions and 32 deletions

View file

@ -911,7 +911,7 @@ class VideoPlayerApi {
}
}
Future<void> open(String url, bool play) async {
Future<bool> open(String url, bool play) async {
final String pigeonVar_channelName = 'dev.flutter.pigeon.nl_jknaapen_fladder.video.VideoPlayerApi.open$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
@ -929,8 +929,13 @@ class VideoPlayerApi {
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else if (pigeonVar_replyList[0] == null) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return;
return (pigeonVar_replyList[0] as bool?)!;
}
}