-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
529 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
130 changes: 130 additions & 0 deletions
130
...ain/kotlin/com/jeluchu/jchucomponents/ui/runtime/remember/RememberMutableDoubleStateOf.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
/* | ||
* | ||
* Copyright 2022 Jeluchu | ||
* | ||
*/ | ||
|
||
@file:Suppress("unused") | ||
|
||
package com.jeluchu.jchucomponents.ui.runtime.remember | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.MutableDoubleState | ||
import androidx.compose.runtime.MutableState | ||
import androidx.compose.runtime.State | ||
import androidx.compose.runtime.mutableDoubleStateOf | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.runtime.snapshots.Snapshot | ||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableDoubleState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableDoubleState] | ||
* | ||
* @see State | ||
* @see MutableDoubleState | ||
*/ | ||
@Composable | ||
fun rememberMutableDoubleStateOf( | ||
value: Double, | ||
): MutableDoubleState = remember { mutableDoubleStateOf(value) } | ||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableDoubleState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableDoubleState] | ||
* | ||
* @see State | ||
* @see MutableDoubleState | ||
*/ | ||
@Composable | ||
fun rememberMutableDoubleStateOf( | ||
key1: Any?, | ||
value: Double | ||
): MutableDoubleState = remember(key1) { mutableDoubleStateOf(value) } | ||
|
||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableDoubleState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableDoubleState] | ||
* | ||
* @see State | ||
* @see MutableDoubleState | ||
*/ | ||
@Composable | ||
fun <T> rememberMutableDoubleStateOf( | ||
key1: Any?, | ||
key2: Any?, | ||
value: Double | ||
): MutableDoubleState = remember(key1, key2) { mutableDoubleStateOf(value) } | ||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableDoubleState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableDoubleState] | ||
* | ||
* @see State | ||
* @see MutableState | ||
*/ | ||
@Composable | ||
fun <T> rememberMutableDoubleStateOf( | ||
key1: Any?, | ||
key2: Any?, | ||
key3: Any?, | ||
value: Double | ||
): MutableDoubleState = remember(key1, key2, key3) { mutableDoubleStateOf(value) } | ||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableDoubleState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableDoubleState] | ||
* | ||
* @see State | ||
* @see MutableDoubleState | ||
*/ | ||
@Composable | ||
fun rememberMutableDoubleStateOf( | ||
vararg keys: Any?, | ||
value: Double | ||
): MutableDoubleState = remember(keys) { mutableDoubleStateOf(value) } |
131 changes: 131 additions & 0 deletions
131
...main/kotlin/com/jeluchu/jchucomponents/ui/runtime/remember/RememberMutableFloatStateOf.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
/* | ||
* | ||
* Copyright 2022 Jeluchu | ||
* | ||
*/ | ||
|
||
@file:Suppress("unused") | ||
|
||
package com.jeluchu.jchucomponents.ui.runtime.remember | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.MutableFloatState | ||
import androidx.compose.runtime.MutableLongState | ||
import androidx.compose.runtime.MutableState | ||
import androidx.compose.runtime.State | ||
import androidx.compose.runtime.mutableFloatStateOf | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.runtime.snapshots.Snapshot | ||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableLongState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableLongState] | ||
* | ||
* @see State | ||
* @see MutableLongState | ||
*/ | ||
@Composable | ||
fun rememberMutableFloatStateOf( | ||
value: Float | ||
): MutableFloatState = remember { mutableFloatStateOf(value) } | ||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableLongState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableLongState] | ||
* | ||
* @see State | ||
* @see MutableLongState | ||
*/ | ||
@Composable | ||
fun rememberMutableFloatStateOf( | ||
key1: Any?, | ||
value: Float | ||
): MutableFloatState = remember(key1) { mutableFloatStateOf(value) } | ||
|
||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableLongState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableLongState] | ||
* | ||
* @see State | ||
* @see MutableLongState | ||
*/ | ||
@Composable | ||
fun <T> rememberMutableFloatStateOf( | ||
key1: Any?, | ||
key2: Any?, | ||
value: Float | ||
): MutableFloatState = remember(key1, key2) { mutableFloatStateOf(value) } | ||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableLongState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableLongState] | ||
* | ||
* @see State | ||
* @see MutableState | ||
*/ | ||
@Composable | ||
fun <T> rememberMutableFloatStateOf( | ||
key1: Any?, | ||
key2: Any?, | ||
key3: Any?, | ||
value: Float | ||
): MutableFloatState = remember(key1, key2, key3) { mutableFloatStateOf(value) } | ||
|
||
/** | ||
* | ||
* This is an overload for the original method. | ||
* If you have any questions, please see the documentation of the original method | ||
* | ||
* Remember a new [MutableLongState] initialized with the passed in [value] | ||
* | ||
* The MutableState class is a single value holder whose reads and writes are observed by | ||
* Compose. | ||
* Additionally, writes to it is transacted as part of the [Snapshot] system. | ||
* | ||
* @param value the initial value for the [MutableLongState] | ||
* | ||
* @see State | ||
* @see MutableLongState | ||
*/ | ||
@Composable | ||
fun rememberMutableFloatStateOf( | ||
vararg keys: Any?, | ||
value: Float | ||
): MutableFloatState = remember(keys) { mutableFloatStateOf(value) } |
Oops, something went wrong.