How do I provide an interface, but give it a concr...
# koin
c
How do I provide an interface, but give it a concrete class, and then use that interface in another provider? example
Copy code
single(createdAtStart = true) { ConcreteRandomNameGenerator() }

  single(createdAtStart = true) {
    val random: InterfaceRandomNameGenerator = get()
    val foo = Foo.init(random.getRand()).build()
    foo
  }
I'm currently getting a crash saying that
No definition found for type InterfaceRandomNameGenerator
j
Copy code
single<InterfaceRandomNameGenerator> { ConcreteRandomNameGenerator() }
there you go 🙂
❤️ 1
2