rememberLottieIconJson

fun rememberLottieIconJson(lightThemeProgress: Float, darkThemeProgress: Float, animationSpec: AnimationSpec<Float>, onReadContentJson: suspend () -> String): ThemeSwitchIcon.LottieFilePainter

Remembers a ThemeSwitchIcon.LottieFilePainter that loads Lottie animation from a composition specification.

This function supports all Lottie composition specification types.

Return

A remembered ThemeSwitchIcon.LottieFilePainter that can be used with ThemeSwitchButton.

Parameters

animationSpec

The animation specification controlling the interpolation between progress values during theme transitions.

darkThemeProgress

The Lottie animation progress value (0.0f to 1.0f) to display when in dark theme.

lightThemeProgress

The Lottie animation progress value (0.0f to 1.0f) to display when in light theme.

onReadContentJson

A suspend function that provides the LottieCompositionSpec defining the animation source. This is called when the icon is first composed and may perform I/O operations to load the animation source.


fun rememberLottieIconJson(lightThemeProgress: Float, darkThemeProgress: Float, systemThemeProgress: Float, animationSpec: AnimationSpec<Float>, onReadContentJson: suspend () -> String): ThemeSwitchIcon.LottieFilePainter

Remembers a ThemeSwitchIcon.LottieFilePainter that loads Lottie animation from a composition specification.

This function supports all Lottie composition specification types.

Return

A remembered ThemeSwitchIcon.LottieFilePainter that can be used with ThemeSwitchButton.

Parameters

animationSpec

The animation specification controlling the interpolation between progress values during theme transitions.

darkThemeProgress

The Lottie animation progress value (0.0f to 1.0f) to display when in dark theme.

lightThemeProgress

The Lottie animation progress value (0.0f to 1.0f) to display when in light theme.

systemThemeProgress

The Lottie animation progress value (0.0f to 1.0f) to display when in system theme.

onReadContentJson

A suspend function that provides the LottieCompositionSpec defining the animation source. This is called when the icon is first composed and may perform I/O operations to load the animation source.