You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
748 B
23 lines
748 B
2 months ago
|
package com.example.jetsnack
|
||
|
|
||
|
import androidx.compose.runtime.Composable
|
||
|
import androidx.compose.ui.graphics.painter.Painter
|
||
|
import androidx.compose.ui.graphics.vector.VectorPainter
|
||
|
import androidx.compose.ui.graphics.vector.rememberVectorPainter
|
||
|
import com.example.jetsnack.MppR
|
||
|
import com.example.jetsnack.ui.myiconpack.EmptyStateSearch
|
||
|
import org.jetbrains.skiko.currentNanoTime
|
||
|
|
||
|
@Composable
|
||
|
actual fun painterResource(id: Int): Painter {
|
||
|
return when(id) {
|
||
|
MppR.drawable.empty_state_search -> rememberVectorPainter(EmptyStateSearch)
|
||
|
else -> TODO()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private var lastId = currentNanoTime().toInt()
|
||
|
|
||
|
|
||
|
private val _empty_state_search = lastId++
|
||
|
actual val MppR.drawable.empty_state_search: Int get() = _empty_state_search
|