Injecting ViewModels with Dagger 2 on Android (Map Multibindings)

Опубликовано: 03 Октябрь 2024
на канале: CodingWithMitch
27,991
488

By default you can't inject ViewModels using Dagger. But there is a pretty well-known work-around using map multibindings.

In this video I show you how to inject ViewModels and perform constructor injection on ViewModels with Dagger using map multibindings.

➤ Watch the dagger course free:
↻ https://codingwithmitch.com/courses/d...

➤ Code for this video:
↻ https://github.com/mitchtabian/Dagger...