getPosition method

  1. @override
Future<Duration> getPosition()
override

Implementation

@override
Future<Duration> getPosition() async {
  try {
    return Duration(
      seconds: int.parse(
          ((await _methodChannel.invokeMethod("position")).toString())
              .split(".")
              .first),
    );
  } catch (e) {
    log(e.toString());
    throw Exception("Unable to Seek [SeekTo]");
  }
}