getDuration method

  1. @override
Future<int> getDuration()
override

Gets the duration of the current audio in milliseconds.

Implementation

@override
Future<int> getDuration() async {
  final result = await methodChannel.invokeMethod<int>('getDuration');
  return result ?? 0;
}