Skip to content

Instantly share code, notes, and snippets.

@AhmedMourad0
Last active March 1, 2024 16:14
Show Gist options
  • Save AhmedMourad0/581e410209c962b8806dc5357e378122 to your computer and use it in GitHub Desktop.
Save AhmedMourad0/581e410209c962b8806dc5357e378122 to your computer and use it in GitHub Desktop.
Code snippet for the `Leveraging the Power of Snapshots in Jetpack Compose` Medium article.
@Stable
class Sticker(
type: StickerType,
width: Dp,
height: Dp,
offset: Offset,
zIndex: Int,
rotation: Float,
scaleX: Float,
scaleY: Float
) {
var type by mutableStateOf(type)
var width by mutableStateOf(width)
var height by mutableStateOf(height)
var offset by mutableStateOf(offset)
var zIndex by mutableStateOf(zIndex)
var rotationZ by mutableStateOf(rotation)
var scaleX by mutableStateOf(scaleX)
var scaleY by mutableStateOf(scaleY)
val id = randomUUID()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment