1

In Kodein, when I have the below binding

    bind<AppDependent>() with singleton {
        AppDependent("abc", instance(), instance())
    }

I could get my appDependent using below

private val appDependent : AppDependent by instance(

However if I like to provide the title as below

    bind<AppDependent>() with multiton {
        title: String -> AppDependent(title, instance(), instance())
    }

How could I create appDependent?

I tried something as below but not working.

private val appDependent : AppDependent by instance("Main")
Elye
  • 53,639
  • 54
  • 212
  • 474

1 Answers1

1

Found that we could do it as below

private val appDependent: AppDependent by instance(arg = "My Text")
Elye
  • 53,639
  • 54
  • 212
  • 474