TilePreviewData


class TilePreviewData


Container class storing data required to render previews for methods annotated with Preview.

Summary

Public constructors

TilePreviewData(
    onTileResourceRequest: (RequestBuilders.ResourcesRequest) -> ResourceBuilders.Resources,
    platformDataValues: PlatformDataValues?,
    onTileRequest: (RequestBuilders.TileRequest) -> TileBuilders.Tile
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

(RequestBuilders.TileRequest) -> TileBuilders.Tile

callback that provides the TileBuilders.Tile to be previewed.

(RequestBuilders.ResourcesRequest) -> ResourceBuilders.Resources

callback that provides a Resources.

PlatformDataValues?

allows overriding platform data values for any PlatformDataKey.

Public constructors

TilePreviewData

Added in 1.4.0
TilePreviewData(
    onTileResourceRequest: (RequestBuilders.ResourcesRequest) -> ResourceBuilders.Resources = { defaultResources },
    platformDataValues: PlatformDataValues? = null,
    onTileRequest: (RequestBuilders.TileRequest) -> TileBuilders.Tile
)
Parameters
onTileResourceRequest: (RequestBuilders.ResourcesRequest) -> ResourceBuilders.Resources = { defaultResources }

callback that provides a Resources. It will be called before rendering the preview of the TileBuilders.Tile. By default, this callback will return a Resources with the version "0".

platformDataValues: PlatformDataValues? = null

allows overriding platform data values for any PlatformDataKey. Default platform data values will be set for all platform health sources that have not been overridden.

onTileRequest: (RequestBuilders.TileRequest) -> TileBuilders.Tile

callback that provides the TileBuilders.Tile to be previewed. It will be called before rendering the preview.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

onTileRequest

Added in 1.3.0
val onTileRequest: (RequestBuilders.TileRequest) -> TileBuilders.Tile

callback that provides the TileBuilders.Tile to be previewed. It will be called before rendering the preview.

onTileResourceRequest

Added in 1.3.0
val onTileResourceRequest: (RequestBuilders.ResourcesRequest) -> ResourceBuilders.Resources

callback that provides a Resources. It will be called before rendering the preview of the TileBuilders.Tile. By default, this callback will return a Resources with the version "0".

platformDataValues

Added in 1.4.0
val platformDataValuesPlatformDataValues?

allows overriding platform data values for any PlatformDataKey. Default platform data values will be set for all platform health sources that have not been overridden.