Use null seek parameter on method channel

This commit is contained in:
Ryan Heise 2020-06-09 01:49:17 +10:00
parent c0f7feeee8
commit 841bd10822
3 changed files with 9 additions and 11 deletions

View file

@ -441,8 +441,7 @@ class AudioPlayer {
/// any state except for [AudioPlaybackState.none] and
/// [AudioPlaybackState.connecting].
Future<void> seek(final Duration position) async {
await _invokeMethod(
'seek', [position != null ? position.inMilliseconds : -2]);
await _invokeMethod('seek', [position?.inMilliseconds]);
}
/// Release all resources associated with this player. You must invoke this