https://kotlinlang.org logo
#compose
Title
# compose
k

Kareem Waleed

07/12/2021, 11:32 AM
I have a method with the signature :
fun map(name: String): @Composable ()->Unit
. I need to generate this function using
KotlinPoet
but I can’t add
@Composable
to the return type, any clues how to do it ?
j

jw

07/12/2021, 11:33 AM
#squarelibraries
Tldr: call annotated on LambdaTypeName
k

Kareem Waleed

07/12/2021, 11:56 AM
What version of the library should I use to find the method you mentioned ?
j

jw

07/12/2021, 12:13 PM
The latest. Is there any reason to not use the latest?
k

Kareem Waleed

07/12/2021, 12:28 PM
Trying to use the version from the docs
1.9.0
giving me an error. Can’t find the package
com.squareup.kotlinpoet
Cannot use it in Java/Kotlin module starting from version 1.7 and above
j

jw

07/12/2021, 3:08 PM
File a bug?
k

Kareem Waleed

07/12/2021, 8:14 PM
Yea sure, thank you 😄
3 Views