This file contains hidden or 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 | |
public fun Column( | |
modifier: Modifier = Modifier, | |
reverseLayout: Boolean = false, | |
verticalArrangement: Arrangement.Vertical = Arrangement.Top, | |
horizontalAlignment: Alignment.Horizontal = Alignment.Start, | |
content: @Composable () -> Unit | |
) { | |
SubcomposeLayout(modifier) { constraints -> | |
val density = Density(density) |
This file contains hidden or 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
private fun measuredViewController( | |
onMeasured: (Double, Double) -> Unit, | |
content: @Composable () -> Unit, | |
): UIViewController = ComposeUIViewController { | |
Box( | |
modifier = Modifier.onGloballyPositioned { | |
onMeasured(it.size.width.toDouble(), it.size.height.toDouble()) | |
}, | |
) { | |
content() |
This file contains hidden or 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
0x112535f04 <+0>: stp x28, x27, [sp, #-0x20]! | |
0x112535f08 <+4>: stp x29, x30, [sp, #0x10] | |
0x112535f0c <+8>: add x29, sp, #0x10 | |
0x112535f10 <+12>: sub sp, sp, #0x5f0 | |
0x112535f14 <+16>: mov x8, #0x0 | |
0x112535f18 <+20>: str x8, [sp, #0x5e0] | |
0x112535f1c <+24>: movi.16b v0, #0x0 | |
0x112535f20 <+28>: str q0, [sp, #0x410] | |
0x112535f24 <+32>: str q0, [sp, #0x5d0] | |
0x112535f28 <+36>: str q0, [sp, #0x5c0] |
This file contains hidden or 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 kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.suspendCancellableCoroutine | |
import platform.CoreFoundation.CFDataRef | |
import platform.CoreGraphics.CGImageRef | |
import platform.Foundation.CFBridgingRelease | |
import platform.Foundation.CFBridgingRetain | |
import platform.Foundation.NSData | |
import platform.Foundation.NSDictionary |
This file contains hidden or 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
interface SettingsSectionScope { | |
fun item( | |
icon: ImageVector? = null, | |
title: String, | |
subtitle: String? = null, | |
endSlot: @Composable () -> Unit = { }, | |
onClick: (() -> Unit)? = null, | |
) | |
@Composable |
This file contains hidden or 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
FKScaffold( | |
modifier = Modifier.fillMaxSize(), | |
topBar = { | |
FKLargeTopAppBar(title = name) | |
}, | |
) { padding, triggerAccessoryView -> | |
ItemForm( | |
modifier = Modifier.padding(top = padding.calculateTopPadding()), | |
state = state, | |
dispatch = viewModel::dispatchEvent |
This file contains hidden or 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 androidx.compose.ui.unit.Density | |
import androidx.compose.ui.unit.DpSize | |
import androidx.compose.ui.unit.IntSize | |
fun IntSize.toDp(density: Density): DpSize = with(density) { DpSize(width = width.toDp(), height = height.toDp()) } |
This file contains hidden or 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 ActionMenuContentDecorator( | |
modifier: Modifier = Modifier, | |
viewModel: ActionMenuViewModel = hiltViewModel(), | |
content: @Composable () -> Unit, // A | |
// content: @Composable (PaddingValues) -> Unit, // B | |
) { | |
val state by viewModel.stateFlow.collectAsStateWithLifecycle() | |
// some parent container type (Scaffold, ModalBottomSheetLayout, etc.) |
This file contains hidden or 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 androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.IntrinsicSize | |
import androidx.compose.foundation.layout.fillMaxHeight | |
import androidx.compose.foundation.layout.height | |
import androidx.compose.foundation.layout.padding | |
import androidx.compose.foundation.shape.CircleShape | |
import androidx.compose.material3.MaterialTheme |
This file contains hidden or 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 | |
actual fun MapView( | |
modifier: Modifier, | |
contentPadding: PaddingValues, | |
userLocation: LatLong?, | |
resultLocations: List<Stay.Minimal>, | |
useTotalPrice: Boolean, | |
onMarkerSelectionChange: (String?) -> Unit, | |
onMapMoved: () -> Unit, | |
) { |
NewerOlder