seek method

Future<void> seek(
  1. Duration to, {
  2. bool force = false,
})

Change the current position of the song Tells the player to go to a specific position of the current song

_assetsAudioPlayer.seek(Duration(minutes: 1, seconds: 34));

Implementation

Future<void> seek(Duration to, {bool force = false}) async {
  if (to != _lastSeek || force) {
    _lastSeek = to;
    await _sendChannel.invokeMethod('seek', {
      'id': id,
      'to': to.inMilliseconds.round(),
    });
  }
}