ListLarge
fun ListLarge(modifier: Modifier = Modifier, contentColor: Color = OrbitTheme.colors.content.normal, iconContentDescription: String? = null, iconTint: Color = Color.Unspecified, icon: Painter = Icons.CircleSmall, verticalArrangement: Arrangement.Vertical = Arrangement.spacedBy(4.dp, Alignment.Top), content: @Composable ListScope.() -> Unit)
Displays a simple list of items with customisable icons using a larger font. Modify via passing a custom modifier.
Hosts the ListItem Composables.
Minimal example:
ListLarge {
ListItem { Text("First item") }
ListItem { Text("Second item") }
ListItem { Text("Third item") }
}
Content copied to clipboard
List with custom icons example:
ListLarge {
ListItem(
icon = { Icon(painter = Icons.BaggagePersonal, contentDescription = null) },
content = { Text("Personal Item") },
),
ListItem(
icon = Icons.BaggageCabin,
content = { Text("Cabin Baggage") },
)
ListItem(
icon = Icons.BaggageChecked20,
content = { Text("Checked Baggage") },
)
}
Content copied to clipboard
List with default icon and icon color that can be overridden by ListItem properties:
ListLarge(
iconTint = OrbitTheme.colors.primary.normal,
icon = Icons.CircleEmpty,
) {
// Resolves to: default icon, default color.
ListItem { Text("First item") }
// Resolves to: custom icon, default color.
ListItem(
icon = { Icon(painter = Icons.Check, contentDescription = null) },
content = { Text("Checked Baggage") },
)
// Resolves to: default icon, custom color.
ListItem(
iconTint = OrbitTheme.colors.critical.normal,
content = { Text("Checked Baggage") },
)
// Resolves to: custom icon, custom color.
ListItem(
iconTint = OrbitTheme.colors.critical.normal,
icon = { Icon(painter = Icons.CloseCircle, contentDescription = null) },
content = { Text("Personal Item") },
)
}
Content copied to clipboard