getProgress method Null safety

Future<Map<String, Duration>> getProgress()

Get the current progress of a playback.

It returns a Map with two Duration entries : 'progress' and 'duration'. Remark : actually only implemented on iOS.


        Duration progress = (await getProgress())['progress'];
        Duration duration = (await getProgress())['duration'];


Future<Map<String, Duration>> getProgress() async {
  await _waitOpen();
  if (_isInited != Initialized.fullyInitialized) {
    throw Exception('Player is not open');

  return FlutterSoundPlayerPlatform.instance.getProgress(this);