You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, it shouldn't take an explicit list, just a single children slot.
Second, a composable called something like ListItem should be introduced. This composable will be scoped to the list slot and display the list marker inside itself by asking the scope for the marker composable. The list will compose it's children slot and determine how many list markers it needs to show, and use that number to calculate the width required to show markers. All children will be "indented" at the start. List item composables will compose the list markers outside of their actual bounds, so they are correctly placed in the margin. Children without a list item wrapper will simply be indented to match list items, with no marker.
This allows more control over how list markers are rendered. E.g. AnimatedVisibility can be used to affect the row and the marker.
The text was updated successfully, but these errors were encountered:
First, it shouldn't take an explicit list, just a single children slot.
Second, a composable called something like
ListItem
should be introduced. This composable will be scoped to the list slot and display the list marker inside itself by asking the scope for the marker composable. The list will compose it's children slot and determine how many list markers it needs to show, and use that number to calculate the width required to show markers. All children will be "indented" at the start. List item composables will compose the list markers outside of their actual bounds, so they are correctly placed in the margin. Children without a list item wrapper will simply be indented to match list items, with no marker.This allows more control over how list markers are rendered. E.g.
AnimatedVisibility
can be used to affect the row and the marker.The text was updated successfully, but these errors were encountered: