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 Demo() { | |
Column { | |
Text("This visually looks good:") | |
TextWithItem("Some text", EmbeddedItem(12.dp, 4.dp)) | |
Spacer(Modifier.height(20.dp)) | |
Text("This is not aligned correctly:") | |
TextWithItem("Some text", EmbeddedItem(12.dp, 20.dp)) |
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 Loader(isLoading: Boolean) { | |
Column(Modifier.fillMaxSize()) { | |
Column(modifier = Modifier | |
.fillMaxWidth() | |
.weight(1f), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center) { | |
val transition = rememberInfiniteTransition() | |
val rotation by transition.animateFloat( | |
initialValue = 0f, |
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
import Foundation | |
// MARK: Validation result | |
enum ValidationResult<Value>: CustomStringConvertible { | |
case success(Value) | |
case failure(Error) | |
var description: String { | |
switch self { |
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
#!/bin/bash | |
unknown_os () | |
{ | |
echo "Unfortunately, your operating system distribution and version are not supported by this script." | |
echo | |
echo "You can override the OS detection by setting os= and dist= prior to running this script." | |
echo "You can find a list of supported OSes and distributions on our website: /docs#os_distro_version" | |
echo | |
echo "For example, to force CentOS 6: os=el dist=6 ./script.sh" |