getDuration method
Implementation
@override
Future<int> getDuration(int viewId) async {
try {
var methodChannel = MethodChannel('${channelPrefix}_$viewId');
return await methodChannel.invokeMethod<int>('duration') ?? 0;
} on PlatformException catch (e) {
debugPrint('${e.code}: ${e.message}');
return 0;
}
}