I have a design system that is not like Material at all EXCEPT for the "card" pattern. We want to keep cards and especially their properties for dark theme (where elevation gets converted to brightness)>
Anyway. What do you all recommend? Not using Material dependency at all? Copy pasting the card code into my app directly. Or including material dep, and just using a Material card?
g
gildor
01/13/2021, 3:50 AM
I would just copy-paste material implementation if Card is the only element what you use
r
radityagumay
01/13/2021, 3:52 AM
it's fine to include material dep and just use material card.
essentially once you enabled proguard all deadcode should be get removed.
g
gildor
01/13/2021, 3:54 AM
I don’t think that it’s “not fine” but I wouldn’t follow this path if you really reimplemented everything, it’s not only about app size, but because you also will have 2 versions of many components between you have to choose (like TextField)
👍 1
b
Bryan Herbst
01/13/2021, 2:19 PM
We are taking the approach of not using the Material library and copying the implementation of the parts we want into our codebase.
At this point we have either wrapped or completely copied just about all of the Material components now so that they use the colors and typography from our design system.
I also have a lint check that checks for Material imports and throws a warning when they are used. It’ll also helpfully offer a quickfix when we have a replacement in our design system