https://kotlinlang.org
Join Slack
Hi Team , Is it possible to use ConstraintLayout in Compose Multiplatofrm , i want to use for ios <@...
s

Shivam Kanodia

over 2 years ago
Hi Team , Is it possible to use ConstraintLayout in Compose Multiplatofrm , i want to use for ios @etolstoy?
s
n
+2
  • 4
  • 5
  • 1183
Is there a way to disable webpack's auto reloading?? It really doesn't help while doing compose 4 We...
a

andylamax

almost 3 years ago
Is there a way to disable webpack's auto reloading?? It really doesn't help while doing compose 4 Web at all. I am trying to see if disabling it might give me more iteration speed
👀 1
a
a
  • 2
  • 4
  • 1180
Hey guys, I want to run `debounce` on a flow from within a Composable. I get this warning Flow opera...
s

Shivam Dhuria

over 3 years ago
Hey guys, I want to run
debounce
on a flow from within a Composable. I get this warning Flow operator functions should not be invoked within composition . I am not using Viewmodels so can’t run the flow operator in the VM. Ideally I’d just want to call
debounce
on the
fullNameFlow
and trigger some changes in the composable. What’s the best way to go forward?
//This is inside a Composable
val fullNameFlow = MutableStateFlow("")
fullNameFlow.debounce(3000).mapLatest {
    Log.i(TAG,it)
    //Change Composable State
}

FormTextField(
    onValueChange = {
        fullNameFlow.value = it
    }
)
s
p
z
  • 3
  • 5
  • 1177
Trying out Kotlin 2.0.0-RC1 and getting `Caused by: java.lang.ExceptionInInitializerError: Exception...
j

John O'Reilly

over 1 year ago
Trying out Kotlin 2.0.0-RC1 and getting
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ArrayStoreException: org.jetbrains.kotlin.konan.target.KonanTarget$IOS_ARM32 [in thread "Daemon worker"]
error when syncing.....this is in KMP project so maybe known issue? Full stack in thread. Tried latest AS canary so far
youtrack 1
✅ 1
j
d
+5
  • 7
  • 43
  • 1176
I'm really struggling to set up SQL Delight in a Compose Desktop project. This the reference I'm usi...
j

John Aoussou

about 3 years ago
I'm really struggling to set up SQL Delight in a Compose Desktop project. This the reference I'm using but I can't quite follow: https://cashapp.github.io/sqldelight/jvm_sqlite/ , does anyone have another template? Please look in the thread to see what I have attempted.
j
h
+2
  • 4
  • 21
  • 1176
is there a way to globally exclude a directory? we have some generated code checked in (yes… we know...
e

Eric

over 3 years ago
is there a way to globally exclude a directory? we have some generated code checked in (yes… we know). And want to exclude that directory from contributing to score and from being formatted automatically.
e
e
+2
  • 4
  • 6
  • 1175
Implemented video player using compose multiplatform for ios, android, and desktop. code can be foun...
k

Kashismails

over 2 years ago
Implemented video player using compose multiplatform for ios, android, and desktop. code can be found here :https://github.com/Kashif-E/Compose-Multiplatform-Video-Player
Screen Recording 2023-07-22 at 2.27.32 AM.mov
👍🏻 1
🦜 1
👍 10
k
n
+2
  • 4
  • 8
  • 1174
(I know it's more a Jackson than a Kotlin question, but I hope someone might have an answer anyway)....
n

nkiesel

over 3 years ago
(I know it's more a Jackson than a Kotlin question, but I hope someone might have an answer anyway). I have a line `val jackson: YAMLMapper = YAMLMapper.builder().addModule(KotlinModule()).build()`in my code to create a Jackson YAML mapper with Kotlin extensions. This tells me "Kotlin: 'constructor KotlinModule(Int = ..., Boolean = ..., Boolean = ..., Boolean = ..., SingletonSupport = ..., Boolean = ...)' is deprecated. Use KotlinModule.Builder instead of named constructor parameters". Does that really mean I should use `val jackson: YAMLMapper = YAMLMapper.builder().addModule(KotlinModule.Builder().build()).build()`instead? That's an awful amount of build...
n
e
m
  • 3
  • 7
  • 1173
I'm trying to map enum to int values: ```@Serializable enum class ItemType { @SerialName("0") Ze...
p

Philip Dukhov

over 3 years ago
I'm trying to map enum to int values:
@Serializable
enum class ItemType {
    @SerialName("0") Zero,
    @SerialName("1") First,
}
But it fails with the following exception:
JsonDecodingException: Unexpected JSON token at offset 194: Expected quotation mark '"', but had '1' instead
    JSON input: ....."type":1,.....
It doesn't seem to work because
SerialName
is expecting a string and json has an int. I can think of two ways to solve this: 1. Enabling lenient mode - I don't like this solution as it also removes restrictions from other fields, which I prefer to keep 2. Implementing a custom serializer - seems like too much of boilerplate code for such a simple task Am I missing something?
p
a
  • 2
  • 7
  • 1172
What is a good way to open a web url in an external browser for iOS with compose multiplatform? Tri...
p

Paul Wisner

about 1 year ago
What is a good way to open a web url in an external browser for iOS with compose multiplatform? Tried `UIApplication.sharedApplication.openURL(NSURL(string = url))`but it prints
[Application] BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).
Also got the same result from
LocalUrlHandler.current.openUri(url)
. I tried what's written in the error message, but that function doesn't seem to be defined. Or I don't know how to write it - I come from an Android compose background.. I also tried directly adding the 1.7.2 version of androidx.compose.ui but gradle sync barfed - looks like a version conflict..
p
m
+2
  • 4
  • 8
  • 1171
Previous333435Next

kotlinlang

A modern programming language that makes developers happier.

Powered by