File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,13 @@ import androidx.compose.foundation.layout.ColumnScope
5
5
import androidx.compose.foundation.layout.WindowInsets
6
6
import androidx.compose.foundation.layout.fillMaxSize
7
7
import androidx.compose.material3.ExperimentalMaterial3Api
8
- import androidx.compose.material3.MaterialTheme
9
8
import androidx.compose.material3.SheetValue
10
- import androidx.compose.runtime.*
9
+ import androidx.compose.runtime.Composable
10
+ import androidx.compose.runtime.CompositionLocalProvider
11
+ import androidx.compose.runtime.DisposableEffect
12
+ import androidx.compose.runtime.LaunchedEffect
13
+ import androidx.compose.runtime.currentCompositionLocalContext
14
+ import androidx.compose.runtime.remember
11
15
import androidx.compose.ui.Modifier
12
16
import androidx.compose.ui.graphics.Color
13
17
import androidx.compose.ui.graphics.Shape
@@ -36,11 +40,14 @@ actual fun AdaptiveBottomSheet(
36
40
onDismissRequest()
37
41
},
38
42
content = {
43
+ val sheetCompositionLocalContext = currentCompositionLocalContext
44
+
39
45
CompositionLocalProvider (compositionLocalContext) {
40
- Column (
41
- modifier = Modifier .fillMaxSize()
42
- ) {
43
- content()
46
+ CompositionLocalProvider (sheetCompositionLocalContext) {
47
+ Column (
48
+ modifier = Modifier .fillMaxSize(),
49
+ content = content,
50
+ )
44
51
}
45
52
}
46
53
}
You can’t perform that action at this time.
0 commit comments