StoryStep

data class StoryStep(val id: String = GenerateId.generate(), val localId: String = GenerateId.generate(), val type: StoryType, val parentId: String? = null, val url: String? = null, val path: String? = null, val text: String? = null, val checked: Boolean? = false, val steps: List<StoryStep> = emptyList(), val decoration: Decoration = Decoration())

The model defining the information that can be draw in the screen. This is the most basic building block of the library and can have many types like image, message, audio, video, button, empty space, etc.

Parameters

id

the ID of the story step. It should be used both in the database and backend.

localId

This in a temporary ID that identifies the current drawing of the content of the StoryStep. It should change everytime the StoryStep is going to be draw in the screen.

type

StoryType The is the type that identifies the story step. The SDK supports many different types like Message, Image, Check_Item, Space, Title, etc.

parentId

The ID of a parent StoryStep, in case this StoryStep is inside a group.

url

Used for fetch an image, video, audio or other type of content.

path

Local path for content, like image, video, audio or other type of content.

text

The text of the StoryStep.

checked

If the type of this StorySteo is "check_item" or other type that can be checked this parameter holds the information if it is checked or not.

steps

List a groups of StorySteps that can be inside the current StoryStep, if it is a group.

decoration

Decoration The decoration fo the StoryStep.

Constructors

Link copied to clipboard
constructor(id: String = GenerateId.generate(), localId: String = GenerateId.generate(), type: StoryType, parentId: String? = null, url: String? = null, path: String? = null, text: String? = null, checked: Boolean? = false, steps: List<StoryStep> = emptyList(), decoration: Decoration = Decoration())

Properties

Link copied to clipboard
val checked: Boolean? = false
Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
val key: Int
Link copied to clipboard
Link copied to clipboard
val parentId: String? = null
Link copied to clipboard
val path: String? = null
Link copied to clipboard
Link copied to clipboard
val text: String? = null
Link copied to clipboard
Link copied to clipboard
val url: String? = null

Functions

Link copied to clipboard
fun copyNewLocalId(localId: String = GenerateId.generate()): StoryStep