I'm trying to use Material3, but because Material(...
# compose
m
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
Did you try to excluding unwanted imports in Editor > General > Auto Import?
t
Usually when the tooltip shows in the right side I scroll to the bottom and check the package, not ideal to be honest 😅
s
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
@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.