Project‐Wide‐Utilities:‐ Placing all the icon references in one single kotlin file - devrath/RunTracer GitHub Wiki
How is it useful
- Instead of referencing them from the composable, We can refer to a single place and use this reference in the composables.
- Doing so we can find all the icons in one single place.
Where to place the code
Icons.kt
package com.istudio.core.presentation.designsystem
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.vectorResource
val AnalyticsIcon: ImageVector
@Composable
get() = ImageVector.vectorResource(id = R.drawable.analytics)
val ArrowLeftIcon: ImageVector
@Composable
get() = ImageVector.vectorResource(id = R.drawable.arrow_left)