getDuration method

  1. @override
Future<double> getDuration(
  1. String path
)
override

Get the duration of the audio file in seconds

Implementation

@override
Future<double> getDuration(String path) async {
  return await methodChannel.invokeMethod<double>('getDuration', {
        'path': path,
      }) ??
      0.0;
}