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
inline fun Modifier.clickable(crossinline onClick: () -> Unit): Modifier = composed { | |
clickable( | |
indication = rememberRipple(), | |
interactionSource = remember { MutableInteractionSource() } | |
) { | |
onClick() | |
} | |
} |
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
@Composable fun Screen( | |
url: String | |
) { | |
var count by rememberState { 0 } | |
val content by rememberState(url) { load(url) } | |
} |
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
/** | |
* Shorthand for | |
* | |
* ``` | |
* remember { | |
* mutableStateOf(...) | |
* } | |
* ``` | |
*/ | |
@Composable |
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
/// | |
/// A subclass of ``XCTestCase`` that supports async setup and teardown. | |
/// | |
class XCAsyncTestCase: XCTestCase { | |
func asyncSetUpWithError() async throws { | |
fatalError("Must override") | |
} | |
func asyncTearDownWithError() async throws { |
NewerOlder