getDuration method
Get duration of video.
Implementation
Future<Duration> getDuration() async {
getDurationCompleter = Completer<Duration>();
await webViewController.evaluateJavascript(
source: 'getDuration();',
);
final duration = await getDurationCompleter?.future;
return duration ?? Duration.zero;
}