Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make default values in ChildPanelsAnimators null #789

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,25 @@ package com.arkivanov.decompose.extensions.compose.experimental.panels

import com.arkivanov.decompose.ExperimentalDecomposeApi
import com.arkivanov.decompose.extensions.compose.experimental.stack.animation.StackAnimator
import com.arkivanov.decompose.extensions.compose.experimental.stack.animation.fade

/**
* Contains panel animators for all layout kinds.
*
* @param single a [StackAnimator] to be used in
* @param single an optional [StackAnimator] to be used in
* [SINGLE][com.arkivanov.decompose.router.panels.ChildPanelsMode.SINGLE] mode.
* @param dual a [Pair] of [StackAnimator] to be used in
* @param dual a [Pair] of optional [StackAnimator] to be used in
* [DUAL][com.arkivanov.decompose.router.panels.ChildPanelsMode.DUAL] mode. The [first][Pair.first] animator
* is used for the primary (first) panel, and the [second][Pair.second] animator is used for the secondary
* (second) panel. Default value is `Pair(single, single)`.
* @param triple a [Triple] of [StackAnimator] to be used in
* @param triple a [Triple] of optional [StackAnimator] to be used in
* [TRIPLE][com.arkivanov.decompose.router.panels.ChildPanelsMode.TRIPLE] mode. The [first][Triple.first] animator
* is used for the primary (first) panel, the [second][Triple.second] animator is used for the secondary (second)
* panel, and the [third][Triple.third] animator is used for the tertiary (third) panel.
* Default values is `Triple(dual.first, dual.second, dual.second)`.
*/
@ExperimentalDecomposeApi
class ChildPanelsAnimators(
val single: StackAnimator? = fade(),
val dual: Pair<StackAnimator?, StackAnimator?> = single to single,
val single: StackAnimator? = null,
val dual: Pair<StackAnimator?, StackAnimator?> = Pair(single, single),
val triple: Triple<StackAnimator?, StackAnimator?, StackAnimator?> = Triple(dual.first, dual.second, dual.second),
)
Loading