Zoltan Demant
10/30/2023, 9:47 AMfun interface User { fun userId(): String? }
• by inject in single {}
• get()
in the actual function call
single {
val authService by inject<AuthService>()
SomeService(
context = get(),
user = {
// get<AuthService>().user()?.id
val user = authService.user()
user?.id
},
)
}
arnaud.giuliani
10/30/2023, 3:41 PMget<AuthService>()
directly