getMimeTypeAsync method
Implementation
Future<String?> getMimeTypeAsync(AssetEntity entity) async {
assert(
Platform.isAndroid ||
Platform.isIOS ||
Platform.isMacOS ||
PlatformUtils.isOhos,
);
if (Platform.isAndroid || PlatformUtils.isOhos) {
return entity.mimeType;
}
if (Platform.isIOS || Platform.isMacOS) {
return _channel.invokeMethod<String>(
PMConstants.mGetMimeTypeAsync,
<String, dynamic>{'id': entity.id},
);
}
return null;
}