Skip to content

Commit

Permalink
- Published 1.0.5 on Maven Central
Browse files Browse the repository at this point in the history
  • Loading branch information
wajahatkarim3 committed Aug 26, 2022
1 parent 08313c8 commit 53fd1a3
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.wajahatkarim.flippable

import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.asSharedFlow

Expand Down Expand Up @@ -56,4 +58,14 @@ class FlippableController {
) {
_flipEnabled = flipEnabled
}
}

/**
* Creates an instance of [FlippableController] and remembers it for recomposition.
*/
@Composable
fun rememberFlipController(): FlippableController {
return remember {
FlippableController()
}
}

0 comments on commit 53fd1a3

Please sign in to comment.