https://kotlinlang.org
Join Slack
I’m getting this after enabling K2 mode > Plugin ‘Kotlin Multiplatform’ wasn’t loaded because it’...
a

aidanvii

about 1 year ago
I’m getting this after enabling K2 mode
Plugin ‘Kotlin Multiplatform’ wasn’t loaded because it’s incompatible with the Kotlin plugin in K2 mode
a
t
+2
  • 4
  • 8
  • 1360
How do you guys handle errors in KMM? For example, I have this use case ```interface SignInUseCase ...
i

Igor Milakovic

over 3 years ago
How do you guys handle errors in KMM? For example, I have this use case
interface SignInUseCase {
    @Throws(Exception::class)
    suspend fun execute(email: String, password: String): Whatever
}
When I call this from iOS, I get
signInUseCase.execute(email: email, password: password) { whatever, error in
    // Handle completion
}
Is there a way to have a custom error here, instead of NSError? Ideally, I'd like to have maybe a class or data class
data class Error(
    val title: String
    val detail: String
}
i
t
g
  • 3
  • 28
  • 1360
what do you guys use to persist data in compose multiplatform? is there some library that does datas...
f

Fudge

about 1 year ago
what do you guys use to persist data in compose multiplatform? is there some library that does datastore on android, local storage on web, etc
f
k
+3
  • 5
  • 16
  • 1355
I always get this error: `The Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-an...
a

Akram Bensalem

about 4 years ago
I always get this error:
The Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android dependency was found.
I wan't to use Hilt with Jetpack Compose but always I got this error
a
s
f
  • 3
  • 32
  • 1349
Is there any way to disable scroll and clicks on children in a LazyColumn?
u

Utkarsh Tiwari

over 4 years ago
Is there any way to disable scroll and clicks on children in a LazyColumn?
u
a
g
  • 3
  • 5
  • 1350
Is there any way to set min window size?
a

Akram Bensalem

almost 4 years ago
Is there any way to set min window size?
a
s
  • 2
  • 3
  • 1343
How to make one item in LazyVerticalGrid fill all the parent width ? Scenario: LazyVerticalGrid wit...
a

Akram Bensalem

about 3 years ago
How to make one item in LazyVerticalGrid fill all the parent width ? Scenario: LazyVerticalGrid with diffrent Lists every list should have it own header How I can implement the header to take all the width ?
a
o
c
  • 3
  • 4
  • 1340
We (still) use slf4j/logback in our Kotlin code. Currently, we define a `val logger: Logger = Logger...
n

nkiesel

over 4 years ago
We (still) use slf4j/logback in our Kotlin code. Currently, we define a
val logger: Logger = LoggerFactory.getLogger(Foo::class.java)
in the companion object of a class
Foo
. I remember a discussion about defining this as a class property instead of as a companion object property (which would then allow to use
val logger: Logger = LoggerFactory.getLogger(this::class.java)
) but I can't find it anymore. What is current best practice here ?
n
n
+4
  • 6
  • 61
  • 1338
Is there a way to show a Compose popup or dialog from an Android custom view? We have lots of Androi...
e

Eric Martori

over 3 years ago
Is there a way to show a Compose popup or dialog from an Android custom view? We have lots of Android custom views that we don't have the time to migrate fully to compose, but we are adding new developments in compose gradually. Adding
ComposeView
in the XML works for most cases, but now we have to show a pop window and an alert on user interaction. We have tried creating the
PopupWindow
and
AlertDialog
programmatically and setting the content view as a
ComposeView
with the desired content but we get errors like:
java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.widget.PopupWindow$PopupDecorView
So we are thinking that maybe there is a way to launch the alert and popup directly from compose, but don't know how to launch it from inside a custom view without replacing the already working content.
e
m
a
  • 3
  • 18
  • 1337
Hey, everyone What should I “git ignore” in a kmm project? is there a .gitignore template for it?
h

henrikhorbovyi

over 3 years ago
Hey, everyone What should I “git ignore” in a kmm project? is there a .gitignore template for it?
➕ 1
h
l
m
  • 3
  • 7
  • 1336
Previous222324Next

kotlinlang

A modern programming language that makes developers happier.

Powered by