The extended FAB is wider than a regular FAB, and it includes a text label.
FluidExtendedFab
@Composable
fun FluidExtendedFab() {
ExtendedFloatingActionButton(
icon = { Icon(Icons.Filled.Favorite, contentDescription = null) },
text = { Text("FLUID FAB") },
onClick = { /*do something*/ },
modifier = Modifier.fillMaxWidth(),
)
}
SimpleExtendedFabWithIcon
@Composable
fun SimpleExtendedFabWithIcon() {
ExtendedFloatingActionButton(
icon = { Icon(Icons.Filled.Favorite, contentDescription = null) },
text = { Text("ADD TO BASKET") },
onClick = { /*do something*/ },
)
}