Browse Source

Migrate to 0.3.0-build146 (widgetsgallery)

pull/328/head
Igor Demin 4 years ago
parent
commit
b649cd9b56
  1. 5
      examples/widgetsgallery/build.gradle.kts
  2. 13
      examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/MainView.kt
  3. 24
      examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/AppBars.kt
  4. 17
      examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Buttons.kt
  5. 5
      examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Chips.kt
  6. 7
      examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/TextInputs.kt
  7. 8
      examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Toggles.kt
  8. 12
      examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/UICards.kt
  9. 1
      examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/utils/ResizablePanel.kt

5
examples/widgetsgallery/build.gradle.kts

@ -9,9 +9,10 @@ buildscript {
dependencies { dependencies {
// __LATEST_COMPOSE_RELEASE_VERSION__ // __LATEST_COMPOSE_RELEASE_VERSION__
classpath("org.jetbrains.compose:compose-gradle-plugin:0.3.0-build135") classpath("org.jetbrains.compose:compose-gradle-plugin:0.3.0-build146")
classpath("com.android.tools.build:gradle:4.0.1") classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.21")) // __KOTLIN_COMPOSE_VERSION__
classpath(kotlin("gradle-plugin", version = "1.4.21-2"))
} }
} }

13
examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/MainView.kt

@ -7,16 +7,20 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumnFor import androidx.compose.foundation.lazy.LazyColumnFor
import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.* import androidx.compose.material.AmbientContentColor
import androidx.compose.material.Text
import androidx.compose.runtime.* import androidx.compose.runtime.*
import androidx.compose.runtime.savedinstancestate.savedInstanceState import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clipToBounds import androidx.compose.ui.draw.clipToBounds
import androidx.compose.ui.platform.AmbientDensity import androidx.compose.ui.platform.AmbientDensity
import androidx.compose.ui.selection.DisableSelection import androidx.compose.ui.selection.DisableSelection
import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.* import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import org.jetbrains.compose.demo.widgets.platform.VerticalScrollbar import org.jetbrains.compose.demo.widgets.platform.VerticalScrollbar
import org.jetbrains.compose.demo.widgets.platform.pointerMoveFilter import org.jetbrains.compose.demo.widgets.platform.pointerMoveFilter
import org.jetbrains.compose.demo.widgets.theme.WidgetGalleryTheme import org.jetbrains.compose.demo.widgets.theme.WidgetGalleryTheme
@ -24,7 +28,6 @@ import org.jetbrains.compose.demo.widgets.ui.utils.PanelState
import org.jetbrains.compose.demo.widgets.ui.utils.ResizablePanel import org.jetbrains.compose.demo.widgets.ui.utils.ResizablePanel
import org.jetbrains.compose.demo.widgets.ui.utils.VerticalSplittable import org.jetbrains.compose.demo.widgets.ui.utils.VerticalSplittable
import org.jetbrains.compose.demo.widgets.ui.utils.withoutWidthConstraints import org.jetbrains.compose.demo.widgets.ui.utils.withoutWidthConstraints
import kotlin.ranges.coerceAtLeast
@Composable @Composable
fun MainView() { fun MainView() {
@ -37,7 +40,7 @@ fun MainView() {
@Composable @Composable
fun WidgetsPanel() { fun WidgetsPanel() {
val widgetsTypeState = savedInstanceState { WidgetsType.sortedValues.first() } val widgetsTypeState = rememberSaveable { mutableStateOf(WidgetsType.sortedValues.first()) }
val panelState = remember { PanelState() } val panelState = remember { PanelState() }
val animatedSize = if (panelState.splitter.isResizing) { val animatedSize = if (panelState.splitter.isResizing) {

24
examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/AppBars.kt

@ -19,7 +19,6 @@ import org.jetbrains.compose.demo.widgets.platform.Res
import org.jetbrains.compose.demo.widgets.platform.imageResource import org.jetbrains.compose.demo.widgets.platform.imageResource
import org.jetbrains.compose.demo.widgets.platform.vectorResource import org.jetbrains.compose.demo.widgets.platform.vectorResource
import org.jetbrains.compose.demo.widgets.theme.twitterColor import org.jetbrains.compose.demo.widgets.theme.twitterColor
import org.jetbrains.compose.demo.widgets.theme.typography
import org.jetbrains.compose.demo.widgets.ui.utils.SubtitleText import org.jetbrains.compose.demo.widgets.ui.utils.SubtitleText
import org.jetbrains.compose.demo.widgets.ui.utils.TitleText import org.jetbrains.compose.demo.widgets.ui.utils.TitleText
@ -39,7 +38,7 @@ private fun TopAppBarsDemo() {
elevation = 8.dp, elevation = 8.dp,
navigationIcon = { navigationIcon = {
IconButton(onClick = {}) { IconButton(onClick = {}) {
Icon(Icons.Default.ArrowBack) Icon(Icons.Default.ArrowBack, contentDescription = "ArrowBack")
} }
} }
) )
@ -53,12 +52,12 @@ private fun TopAppBarsDemo() {
elevation = 8.dp, elevation = 8.dp,
navigationIcon = { navigationIcon = {
IconButton(onClick = {}) { IconButton(onClick = {}) {
Icon(vectorResource(Res.drawable.ic_instagram)) Icon(vectorResource(Res.drawable.ic_instagram), contentDescription = "Instagram")
} }
}, },
actions = { actions = {
IconButton(onClick = {}) { IconButton(onClick = {}) {
Icon(vectorResource(Res.drawable.ic_send)) Icon(vectorResource(Res.drawable.ic_send), contentDescription = "Send")
} }
} }
) )
@ -69,6 +68,7 @@ private fun TopAppBarsDemo() {
title = { title = {
Icon( Icon(
vectorResource(Res.drawable.ic_twitter), vectorResource(Res.drawable.ic_twitter),
contentDescription = "Twitter",
tint = twitterColor, tint = twitterColor,
modifier = Modifier.fillMaxWidth() modifier = Modifier.fillMaxWidth()
) )
@ -79,6 +79,7 @@ private fun TopAppBarsDemo() {
navigationIcon = { navigationIcon = {
Image( Image(
imageResource(Res.drawable.p6), imageResource(Res.drawable.p6),
contentDescription = "",
modifier = Modifier.padding(vertical = 4.dp, horizontal = 8.dp) modifier = Modifier.padding(vertical = 4.dp, horizontal = 8.dp)
.preferredSize(32.dp).clip(CircleShape) .preferredSize(32.dp).clip(CircleShape)
) )
@ -86,6 +87,7 @@ private fun TopAppBarsDemo() {
actions = { actions = {
Icon( Icon(
Icons.Default.StarBorder, Icons.Default.StarBorder,
contentDescription = "",
modifier = Modifier.padding(horizontal = 8.dp) modifier = Modifier.padding(horizontal = 8.dp)
) )
} }
@ -102,7 +104,7 @@ private fun BottomAppBarDemo() {
cutoutShape = CircleShape cutoutShape = CircleShape
) { ) {
IconButton(onClick = {}) { IconButton(onClick = {}) {
Icon(Icons.Default.MoreHoriz) Icon(Icons.Default.MoreHoriz, contentDescription = "")
} }
TitleText(title = "Bottom App Bar") TitleText(title = "Bottom App Bar")
} }
@ -115,19 +117,19 @@ private fun NavigationBarDemo() {
val navItemState = remember { mutableStateOf(NavType.HOME) } val navItemState = remember { mutableStateOf(NavType.HOME) }
BottomNavigation(backgroundColor = MaterialTheme.colors.surface) { BottomNavigation(backgroundColor = MaterialTheme.colors.surface) {
BottomNavigationItem( BottomNavigationItem(
icon = { Icon(Icons.Outlined.Home) }, icon = { Icon(Icons.Outlined.Home, contentDescription = "Home") },
selected = navItemState.value == NavType.HOME, selected = navItemState.value == NavType.HOME,
onClick = { navItemState.value = NavType.HOME }, onClick = { navItemState.value = NavType.HOME },
label = { Text(text = Res.string.spotify_nav_home) }, label = { Text(text = Res.string.spotify_nav_home) },
) )
BottomNavigationItem( BottomNavigationItem(
icon = { Icon(Icons.Outlined.Search) }, icon = { Icon(Icons.Outlined.Search, contentDescription = "Search") },
selected = navItemState.value == NavType.SEARCH, selected = navItemState.value == NavType.SEARCH,
onClick = { navItemState.value = NavType.SEARCH }, onClick = { navItemState.value = NavType.SEARCH },
label = { Text(text = Res.string.spotify_nav_search) } label = { Text(text = Res.string.spotify_nav_search) }
) )
BottomNavigationItem( BottomNavigationItem(
icon = { Icon(Icons.Outlined.LibraryMusic) }, icon = { Icon(Icons.Outlined.LibraryMusic, contentDescription = "LibraryMusic") },
selected = navItemState.value == NavType.LIBRARY, selected = navItemState.value == NavType.LIBRARY,
onClick = { navItemState.value = NavType.LIBRARY }, onClick = { navItemState.value = NavType.LIBRARY },
label = { Text(text = Res.string.spotify_nav_library) } label = { Text(text = Res.string.spotify_nav_library) }
@ -138,17 +140,17 @@ private fun NavigationBarDemo() {
BottomNavigation { BottomNavigation {
BottomNavigationItem( BottomNavigationItem(
icon = { Icon(Icons.Outlined.ReadMore) }, icon = { Icon(Icons.Outlined.ReadMore, contentDescription = "ReadMore") },
selected = navItemState.value == NavType.HOME, selected = navItemState.value == NavType.HOME,
onClick = { navItemState.value = NavType.HOME }, onClick = { navItemState.value = NavType.HOME },
) )
BottomNavigationItem( BottomNavigationItem(
icon = { Icon(Icons.Outlined.Search) }, icon = { Icon(Icons.Outlined.Search, contentDescription = "Search") },
selected = navItemState.value == NavType.SEARCH, selected = navItemState.value == NavType.SEARCH,
onClick = { navItemState.value = NavType.SEARCH }, onClick = { navItemState.value = NavType.SEARCH },
) )
BottomNavigationItem( BottomNavigationItem(
icon = { Icon(Icons.Outlined.CleanHands) }, icon = { Icon(Icons.Outlined.CleanHands, contentDescription = "CleanHands") },
selected = navItemState.value == NavType.LIBRARY, selected = navItemState.value == NavType.LIBRARY,
onClick = { navItemState.value = NavType.LIBRARY }, onClick = { navItemState.value = NavType.LIBRARY },
) )

17
examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Buttons.kt

@ -12,9 +12,8 @@ import androidx.compose.material.icons.filled.FavoriteBorder
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.HorizontalGradient
import androidx.compose.ui.graphics.VerticalGradient
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import org.jetbrains.compose.demo.widgets.theme.purple import org.jetbrains.compose.demo.widgets.theme.purple
import org.jetbrains.compose.demo.widgets.theme.purple200 import org.jetbrains.compose.demo.widgets.theme.purple200
@ -38,7 +37,7 @@ fun Buttons() {
Button( Button(
onClick = {}, onClick = {},
modifier = Modifier.padding(8.dp), modifier = Modifier.padding(8.dp),
elevation = ButtonConstants.defaultElevation() elevation = ButtonDefaults.elevation()
) { ) {
Text(text = "Flat") Text(text = "Flat")
} }
@ -54,19 +53,19 @@ fun Buttons() {
} }
Button(onClick = {}, modifier = Modifier.padding(8.dp)) { Button(onClick = {}, modifier = Modifier.padding(8.dp)) {
Row { Row {
Icon(Icons.Default.FavoriteBorder, modifier = Modifier.padding(end = 4.dp)) Icon(Icons.Default.FavoriteBorder, contentDescription = null, modifier = Modifier.padding(end = 4.dp))
Text(text = "Icon Button") Text(text = "Icon Button")
} }
} }
Button(onClick = {}, modifier = Modifier.padding(8.dp)) { Button(onClick = {}, modifier = Modifier.padding(8.dp)) {
Text(text = "Icon Button") Text(text = "Icon Button")
Icon(Icons.Default.FavoriteBorder, modifier = Modifier.padding(start = 4.dp)) Icon(Icons.Default.FavoriteBorder, contentDescription = null, modifier = Modifier.padding(start = 4.dp))
} }
//custom background buttons //custom background buttons
val outlineButtonColor = ButtonConstants.defaultOutlinedButtonColors( val outlineButtonColor = ButtonDefaults.outlinedButtonColors(
contentColor = purple200, contentColor = purple200,
) )
val mainButtonColor = ButtonConstants.defaultButtonColors( val mainButtonColor = ButtonDefaults.buttonColors(
backgroundColor = purple, backgroundColor = purple,
contentColor = MaterialTheme.colors.surface contentColor = MaterialTheme.colors.surface
) )
@ -81,12 +80,12 @@ fun Buttons() {
Text(text = "Custom colors") Text(text = "Custom colors")
} }
val horizontalGradient = HorizontalGradient( val horizontalGradient = Brush.horizontalGradient(
colors = listOf(MaterialTheme.colors.primary, MaterialTheme.colors.primaryVariant), colors = listOf(MaterialTheme.colors.primary, MaterialTheme.colors.primaryVariant),
0f, 0f,
250f 250f
) )
val verticalGradient = VerticalGradient( val verticalGradient = Brush.verticalGradient(
colors = listOf(MaterialTheme.colors.primary, MaterialTheme.colors.primaryVariant), colors = listOf(MaterialTheme.colors.primary, MaterialTheme.colors.primaryVariant),
startY = 0f, startY = 0f,
endY = 100f endY = 100f

5
examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Chips.kt

@ -3,7 +3,6 @@ package org.jetbrains.compose.demo.widgets.ui.screens
import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Button import androidx.compose.material.Button
@ -17,9 +16,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import org.jetbrains.compose.demo.widgets.platform.Res import org.jetbrains.compose.demo.widgets.platform.Res
import org.jetbrains.compose.demo.widgets.theme.typography
import org.jetbrains.compose.demo.widgets.ui.utils.SubtitleText
import org.jetbrains.compose.demo.widgets.platform.imageResource import org.jetbrains.compose.demo.widgets.platform.imageResource
import org.jetbrains.compose.demo.widgets.ui.utils.SubtitleText
@Composable @Composable
fun Chips() { fun Chips() {
@ -88,6 +86,7 @@ private fun CustomImageChip(
Row(modifier = Modifier) { Row(modifier = Modifier) {
Image( Image(
imageResource(imageId), imageResource(imageId),
contentDescription = null,
modifier = Modifier.padding(8.dp).preferredSize(20.dp).clip(CircleShape) modifier = Modifier.padding(8.dp).preferredSize(20.dp).clip(CircleShape)
) )
Text( Text(

7
examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/TextInputs.kt

@ -17,7 +17,6 @@ import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import org.jetbrains.compose.demo.widgets.theme.typography
@Composable @Composable
fun TextInputs() { fun TextInputs() {
@ -52,7 +51,7 @@ fun TextInputs() {
OutlinedTextField( OutlinedTextField(
value = text, value = text,
leadingIcon = { Icon(Icons.Default.Email) }, leadingIcon = { Icon(Icons.Default.Email, contentDescription = "Email") },
modifier = Modifier.padding(8.dp).fillMaxWidth(), modifier = Modifier.padding(8.dp).fillMaxWidth(),
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text), keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text),
label = { Text(text = "Email address") }, label = { Text(text = "Email address") },
@ -63,8 +62,8 @@ fun TextInputs() {
) )
OutlinedTextField( OutlinedTextField(
value = text, value = text,
leadingIcon = { Icon(Icons.Default.Email) }, leadingIcon = { Icon(Icons.Default.Email, contentDescription = "Email") },
trailingIcon = { Icon(Icons.Default.Edit) }, trailingIcon = { Icon(Icons.Default.Edit, contentDescription = "Edit") },
modifier = Modifier.padding(8.dp).fillMaxWidth(), modifier = Modifier.padding(8.dp).fillMaxWidth(),
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text), keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text),
label = { Text(text = "Email address") }, label = { Text(text = "Email address") },

8
examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Toggles.kt

@ -1,12 +1,14 @@
package org.jetbrains.compose.demo.widgets.ui.screens package org.jetbrains.compose.demo.widgets.ui.screens
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.* import androidx.compose.material.*
import androidx.compose.runtime.* import androidx.compose.runtime.*
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import org.jetbrains.compose.demo.widgets.theme.typography
@Composable @Composable
fun Toggles() { fun Toggles() {
@ -21,7 +23,7 @@ fun Toggles() {
var switched by remember { mutableStateOf(true) } var switched by remember { mutableStateOf(true) }
Switch( Switch(
checked = switched, checked = switched,
colors = SwitchConstants.defaultColors(checkedThumbColor = MaterialTheme.colors.primary), colors = SwitchDefaults.colors(checkedThumbColor = MaterialTheme.colors.primary),
modifier = Modifier.padding(8.dp), modifier = Modifier.padding(8.dp),
onCheckedChange = { switched = it } onCheckedChange = { switched = it }
) )

12
examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/UICards.kt

@ -27,7 +27,7 @@ fun UICards() {
Card( Card(
modifier = Modifier.padding(8.dp).fillMaxWidth(), modifier = Modifier.padding(8.dp).fillMaxWidth(),
backgroundColor = MaterialTheme.colors.primary, backgroundColor = MaterialTheme.colors.primary,
shape = RoundedCornerShape(topLeft = 16.dp, bottomRight = 16.dp) shape = RoundedCornerShape(topStart = 16.dp, bottomEnd = 16.dp)
) { ) {
Column { Column {
Text( Text(
@ -53,6 +53,7 @@ fun UICards() {
Row { Row {
Image( Image(
imageResource(Res.drawable.p3), imageResource(Res.drawable.p3),
contentDescription = null,
modifier = Modifier.preferredSize(60.dp) modifier = Modifier.preferredSize(60.dp)
) )
Text(text = item.title, modifier = Modifier.padding(16.dp)) Text(text = item.title, modifier = Modifier.padding(16.dp))
@ -75,7 +76,8 @@ fun UICards() {
Divider(modifier = Modifier.padding(4.dp)) Divider(modifier = Modifier.padding(4.dp))
ListItem(text = { Text(item.title) }, secondaryText = { Text(item.subtitle) }, icon = { ListItem(text = { Text(item.title) }, secondaryText = { Text(item.subtitle) }, icon = {
Image( Image(
imageResource(Res.drawable.p3) imageResource(Res.drawable.p3),
contentDescription = null
) )
}) })
Divider(modifier = Modifier.padding(4.dp)) Divider(modifier = Modifier.padding(4.dp))
@ -83,7 +85,7 @@ fun UICards() {
ListItem( ListItem(
text = { Text(item.title) }, text = { Text(item.title) },
secondaryText = { Text(item.subtitle) }, secondaryText = { Text(item.subtitle) },
icon = { Image(imageResource(Res.drawable.p1)) }, icon = { Image(imageResource(Res.drawable.p1), contentDescription = null) },
overlineText = { Text("Overline text") }, overlineText = { Text("Overline text") },
singleLineSecondaryText = false singleLineSecondaryText = false
) )
@ -91,8 +93,8 @@ fun UICards() {
ListItem( ListItem(
text = { Text(item.title) }, text = { Text(item.title) },
secondaryText = { Text(item.subtitle) }, secondaryText = { Text(item.subtitle) },
icon = { Image(imageResource(Res.drawable.p2)) }, icon = { Image(imageResource(Res.drawable.p2), contentDescription = null) },
trailing = { Icon(Icons.Default.ShoppingCart) }, trailing = { Icon(Icons.Default.ShoppingCart, contentDescription = null) },
singleLineSecondaryText = false singleLineSecondaryText = false
) )
Divider() Divider()

1
examples/widgetsgallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/utils/ResizablePanel.kt

@ -55,6 +55,7 @@ fun ResizablePanel(
Icon( Icon(
if (state.isExpanded) Icons.Default.ArrowBack else Icons.Default.ArrowForward, if (state.isExpanded) Icons.Default.ArrowBack else Icons.Default.ArrowForward,
contentDescription = if (state.isExpanded) "Collapse" else "Expand",
tint = AmbientContentColor.current, tint = AmbientContentColor.current,
modifier = Modifier modifier = Modifier
.size(24.dp) .size(24.dp)

Loading…
Cancel
Save