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

Marcin Wisniowski

03/27/2023, 1:34 PM
I'm trying to use Material3, but because Material(2) is a transitive dependency of libraries I'm using (like Accompanist), components from there get suggested to me. For example when I want to add a
Button
, autocomplete suggests both the Button from Material2 and from Material3, and it's impossible to tell which is which. How are people solving this issue? Adding the material2 package to "exclude from auto-import and suggestions", or am I missing something?
k

Kazik

03/27/2023, 1:50 PM
Did you try to excluding unwanted imports in Editor > General > Auto Import?
t

Tgo1014

03/27/2023, 1:50 PM
Usually when the tooltip shows in the right side I scroll to the bottom and check the package, not ideal to be honest 😅
s

Stylianos Gakis

03/27/2023, 1:52 PM
Especially troublesome when you got an app where you still use both, so you can’t even do the workaround of excluding the m2 components from showing up. I do the exact same thing Tiago is suggesting, unfortunately haven’t found a better way to approach this.
m

Marcin Wisniowski

03/27/2023, 2:09 PM
@Kazik Yes, that's what I said in the last sentence of my message. 😄 I was wondering if there is a better solution, but it might be it.
12 Views