Skip to content

Instantly share code, notes, and snippets.

@marcinOz
Created January 25, 2019 10:58
Show Gist options
  • Save marcinOz/cfa2896a15b2a96acaa18815bee942a8 to your computer and use it in GitHub Desktop.
Save marcinOz/cfa2896a15b2a96acaa18815bee942a8 to your computer and use it in GitHub Desktop.
companion object {
fun getComponent(context: Context) =
(context.applicationContext as WTWApplication).appComponent
}
lateinit var appComponent: AppComponent
override fun onCreate() {
super.onCreate()
appComponent = DaggerAppComponent
.builder()
.application(this)
.build()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment