getCachedMediaPath static method

Future<String?> getCachedMediaPath(
  1. BaseMessage message
)

Offline media: the local file path for message's attachment if the bytes are cached. Never touches the network.

null is not an error — it means "not cached". Render a placeholder or load the remote URL live when online. The path is a cache hint that can disappear (LRU eviction, cache clear, auth wipe): re-resolve it on each render/bind and never persist it in your own storage.

Implementation

static Future<String?> getCachedMediaPath(BaseMessage message) =>
    OfflineRuntime.instance.cachedMediaPath(message);