mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 22:37:03 +05:30
Fix items persistence
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
79299ee95a
commit
07d30410da
1 changed files with 2 additions and 4 deletions
|
@ -13,9 +13,7 @@ import androidx.compose.material.TopAppBar
|
|||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.ExposurePlus1
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.mutableStateListOf
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.setContent
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
@ -38,7 +36,7 @@ class MainActivity : AppCompatActivity() {
|
|||
@Preview
|
||||
@Composable
|
||||
fun TodoApp() {
|
||||
val items by remember { mutableStateOf(arrayListOf(TodoItem("Default item"))) }
|
||||
val items = mutableStateListOf(TodoItem("Default item"))
|
||||
|
||||
Scaffold(
|
||||
topBar = { TopAppBar({ Text(text = "I can Compose?") }) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue