Last active
March 1, 2024 16:14
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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