Skip to content

Instantly share code, notes, and snippets.

View arohim's full-sized avatar
😁

a-rohim arohim

😁
View GitHub Profile
1. hiltvm (applicable in top-level)
@dagger.hilt.android.lifecycle.HiltViewModel
class $NAME$ @javax.inject.Inject constructor(
$PARAM$
) : androidx.lifecycle.ViewModel() {
$END$
}
2. vmstatefunc (applicable in class)
private val _$NAME$ = androidx.compose.runtime.mutableStateOf<$TYPE$>($INITIAL_VALUE$)
@arohim
arohim / NewInstance.kt
Last active August 4, 2020 04:12 — forked from MarcinMoskala/NewInstance.kt
Random Kotlin Instance
import com.google.gson.Gson
import com.google.gson.JsonElement
import kotlin.random.Random
import kotlin.reflect.KClass
import kotlin.reflect.KType
import kotlin.reflect.KTypeParameter
import kotlin.reflect.typeOf
@ExperimentalStdlibApi