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

Socheat KHAUV

05/22/2020, 2:59 PM
ContextAmbient.current is not available, is there alternative way to get current Context ?
l

Leland Richardson [G]

05/22/2020, 4:47 PM
what do you mean its not available?
s

Socheat KHAUV

05/23/2020, 5:11 AM
k

Kazemihabib1996

05/23/2020, 7:43 AM
@Socheat KHAUV Does building the project throws the same error? It might be the problem of kotlin plugin.
s

Socheat KHAUV

05/23/2020, 8:02 AM
l

Leland Richardson [G]

05/23/2020, 5:06 PM
does this happen for all ambients? for example,
DensityAmbient
?
v

Val Salamakha

05/24/2020, 4:29 AM
It seems to me it var(val) context = ContextAmbient.current works fine. To understand an error, it is better to write OS details, AS details, Kotlin plugin details, Compose version.
s

Socheat KHAUV

05/24/2020, 8:31 PM
@Val Salamakha , yeah you are right. my project is dev-03, i update to dev-11, it works (Y)
3 Views