rememberExpandableState
Android
@Composable
public fun rememberExpandableState(
initiallyExpanded: Boolean = false,
expandAnimationSpec: AnimationSpec<Float> = ExpandableItemsDefaults.expandAnimationSpec,
collapseAnimationSpec: AnimationSpec<Float> = ExpandableItemsDefaults.collapseAnimationSpec,
): ExpandableState
Create and remember an ExpandableState
Example of an expandable list:
Example of an expandable text:
Parameters
| initiallyExpanded | The initial value of the state. |
| expandAnimationSpec | The AnimationSpec to use when showing the extra information. |
| collapseAnimationSpec | The AnimationSpec to use when hiding the extra information. |