getDurationWithOptions method
Implementation
Future<int> getDurationWithOptions(String id, {int? subtype}) async {
if (Platform.isIOS || Platform.isMacOS) {
if (subtype != null) {
final result = await _channel.invokeMethod(
PMConstants.mGetDurationWithOptions,
<String, dynamic>{
'id': id,
'subtype': subtype,
},
);
return result as int;
}
}
final entity = await AssetEntity.fromId(id);
return entity!.duration;
}