getMimeTypeAsync method

Future<String?> getMimeTypeAsync(
  1. AssetEntity entity
)

Implementation

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