Compose 1.3.6
github-actions
released this
15 Feb 02:46
·
86 commits
to refs/heads/main
since this release
Library | Dependencies |
---|---|
readmore-foundation | Jetpack Compose 1.4.0-beta01 |
readmore-material | Jetpack Compose 1.4.0-beta01 |
readmore-material3 | Jetpack Compose 1.4.0-beta01 + Compose Material3 1.1.0-alpha06 |
⚠️ Breaking Changes
onReadMoreClick
, onReadLessClick
slots are removed. (Added in Compose 1.3.5
)
So, if you are already using this attribute, you need to change your code like this:
foundation:
val (expanded, onExpandedChange) = rememberSaveable { mutableStateOf(false) }
BasicReadMoreText(
text = "text",
expanded = expanded,
+ onExpandedChange = onExpandedChange,
...
- onReadMoreClick = {
- onExpandedChange(true)
- },
readLessText = stringResource(id = R.string.read_less),
- onReadLessClick = {
- onExpandedChange(false)
- },
+ toggleArea = ToggleArea.More,
)
material, material3:
val (expanded, onExpandedChange) = rememberSaveable { mutableStateOf(false) }
ReadMoreText(
text = "text",
expanded = expanded,
+ onExpandedChange = onExpandedChange,
...
- onReadMoreClick = {
- onExpandedChange(true)
- },
readLessText = stringResource(id = R.string.read_less),
- onReadLessClick = {
- onExpandedChange(false)
- },
+ toggleArea = ToggleArea.More,
)