how this basic icon ‘remove’ `-` is not available ...
# compose
h
how this basic icon ‘remove’
-
is not available by default .
Copy code
imageVector = Icons.Default.Add, // works
imageVector = Icons.Default.Remove,  // gives error
how to add icons efficiently without using extended icon dependency and proguard ? (as i need only fews icons)
s
Minification of your app should strip away all the icons that you don’t use anyway in production builds. Otherwise if you don’t want that, copy paste the code from the extended icons library into your app directly.
m
To add to this, you can use https://www.composables.com/icons to copy-paste the icon you want directly as those icons are actually generated not written manually, so, for example you won't find their source code on https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/
t
With Compose you should always use R8/proguard with optimization.
☝️ 1
s
With Compose you should always use R8/proguard with optimization.
m
This is what I prefer always, especially because Proguard/R8 doesn't require any extra config from your side to strip those unnecessary icons but the OP for some reason avoids minification tools.
s
No they didn’t say that, maybe they were not aware that they would be stripped anyway and was just worried about it, which is a perfect valid concern to have. Or they don’t want their namespace to be polluted with all the icons when they do
Icons.Default.
and get a ton of autocompletion results.