Spout you secret key
This file contains hidden or 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
data class Note( | |
var id: Int, | |
var title: String = "", | |
var content: String = "", | |
var isVisible: Boolean = true | |
) |
This file contains hidden or 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
@ExperimentalMaterialApi | |
@ExperimentalAnimationApi | |
@Composable | |
fun ItemNote( | |
note: Note, | |
onDeleteNote: (Note) -> Unit | |
) { | |
val iconSize = (-68).dp | |
val swipeableState = rememberSwipeableState(0) | |
val iconPx = with(LocalDensity.current) { iconSize.toPx() } |
This file contains hidden or 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
@ExperimentalAnimationApi | |
@ExperimentalMaterialApi | |
@Composable | |
fun HomeScreen() { | |
var notes by remember { | |
mutableStateOf( | |
listOf( | |
Note(1,"1st Note", "Curabitur gravida eros sed magna."), | |
Note(2,"2nd Note", "Etiam posuere volutpat luctus. Sed."), | |
Note(3,"3rd Note", "Lorem ipsum dolor sit amet") |