ToggleFloatingActionButtonDefaults


Contains the default values used by ToggleFloatingActionButton

Summary

Public functions

Modifier
@Composable
Modifier.animateIcon(
    checkedProgress: () -> Float,
    color: (Float) -> Color,
    size: (Float) -> Dp
)

Modifier for animating the color and size of an icon within ToggleFloatingActionButton based on a progress value.

Cmn
(Float) -> Color
@Composable
containerColor(initialColor: Color, finalColor: Color)
Cmn
(Float) -> Dp
Cmn
(Float) -> Dp
containerCornerRadius(initialSize: Dp, finalSize: Dp)
Cmn
(Float) -> Dp
Cmn
(Float) -> Dp
Cmn
(Float) -> Dp
Cmn
(Float) -> Dp
containerSize(initialSize: Dp, finalSize: Dp)
Cmn
(Float) -> Dp
Cmn
(Float) -> Dp
Cmn
(Float) -> Color
@Composable
iconColor(initialColor: Color, finalColor: Color)
Cmn
(Float) -> Dp
Cmn
(Float) -> Dp
iconSize(initialSize: Dp, finalSize: Dp)
Cmn
(Float) -> Dp
Cmn
(Float) -> Dp
Cmn

Public functions

@Composable
fun Modifier.animateIcon(
    checkedProgress: () -> Float,
    color: (Float) -> Color = iconColor(),
    size: (Float) -> Dp = iconSize()
): Modifier

Modifier for animating the color and size of an icon within ToggleFloatingActionButton based on a progress value.

Parameters
checkedProgress: () -> Float

callback that provides the progress value for the icon animation

color: (Float) -> Color = iconColor()

the color of the icon, based on the checked progress value from 0-1

size: (Float) -> Dp = iconSize()

the size of the icon, based on the checked progress value from 0-1

containerColor

@Composable
fun containerColor(
    initialColor: Color = MaterialTheme.colorScheme.primaryContainer,
    finalColor: Color = MaterialTheme.colorScheme.primary
): (Float) -> Color

containerCornerRadius

fun containerCornerRadius(): (Float) -> Dp

containerCornerRadius

fun containerCornerRadius(initialSize: Dp, finalSize: Dp = FabFinalCornerRadius): (Float) -> Dp

containerCornerRadiusLarge

fun containerCornerRadiusLarge(): (Float) -> Dp

containerCornerRadiusMedium

fun containerCornerRadiusMedium(): (Float) -> Dp

containerSize

fun containerSize(): (Float) -> Dp

containerSize

fun containerSize(initialSize: Dp, finalSize: Dp = FabFinalSize): (Float) -> Dp

containerSizeLarge

fun containerSizeLarge(): (Float) -> Dp

containerSizeMedium

fun containerSizeMedium(): (Float) -> Dp

iconColor

@Composable
fun iconColor(
    initialColor: Color = MaterialTheme.colorScheme.onPrimaryContainer,
    finalColor: Color = MaterialTheme.colorScheme.onPrimary
): (Float) -> Color

iconSize

fun iconSize(): (Float) -> Dp

iconSize

fun iconSize(initialSize: Dp, finalSize: Dp = FabFinalIconSize): (Float) -> Dp

iconSizeLarge

fun iconSizeLarge(): (Float) -> Dp

iconSizeMedium

fun iconSizeMedium(): (Float) -> Dp