Skip to content

Instantly share code, notes, and snippets.

@hkhc
Created October 1, 2018 15:09
Show Gist options
  • Save hkhc/7f577e82421036cfc44e138fff6feb7c to your computer and use it in GitHub Desktop.
Save hkhc/7f577e82421036cfc44e138fff6feb7c to your computer and use it in GitHub Desktop.
package myapp.di.annotations
import androidx.lifecycle.ViewModel
import dagger.MapKey
import kotlin.reflect.KClass
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
@kotlin.annotation.Retention(AnnotationRetention.RUNTIME)
@MapKey
internal annotation class ViewModelKey(val value: KClass<out ViewModel>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment