AdaptyCustomAsset
Represents a customizable media or color asset used within Adapty Paywalls and Onboardings.
Use custom assets to override default images, videos, or colors displayed in your paywalls. This allows you to personalize the user experience — for example, showing a different image to specific user segments or providing a local placeholder while remote media loads.
Hero Assets
Hero elements have predefined IDs:
"hero_image""hero_video"
You can replace these assets directly using their IDs.
Custom IDs
For other images and videos, set a custom ID in the Adapty Dashboard to target them from your custom asset bundle.
Example use cases
Show different visuals for different audiences.
Display a local fallback image while a remote image is downloading.
Show a preview image before playing a video.
See also
for passing custom assets
Inheritors
Types
Defines a color asset using a HEX color string.
Defines a linear gradient composed of multiple colors.
Represents an image stored as raw byte data. Useful when loading images dynamically (e.g., from memory or a cache).
References an image file stored on the device file system. Use this if your image is located outside the app bundle.
References a local drawable or image resource from your app bundle.
References a video stored on the device file system.
References a local video resource bundled with the app. The file should be placed under: commonMain/composeResources/files/...