getPathRelativePath method

Future<String?> getPathRelativePath(
  1. AssetPathEntity pathEntity
)

Implementation

Future<String?> getPathRelativePath(AssetPathEntity pathEntity) async {
  if (Platform.isIOS || Platform.isMacOS) {
    // iOS/macOS use logical albums (PHAssetCollection) without physical paths
    return null;
  }
  if (Platform.isAndroid) {
    return _channel.invokeMethod(
      PMConstants.mGetPathRelativePath,
      <String, dynamic>{'id': pathEntity.id},
    );
  }
  if (PlatformUtils.isOhos) {
    return null;
  }
  return null;
}