Retrieve Photo in ViewModel |

This is a companion discussion topic for the original entry at

@kevindmoore here constructor injection isn’t the preferred approach instead of field injection? Please tell us a little more about that difference in Android context.

That is one of the beauties of Koin. You can use it for fields as well. It can be used for constructor injection but then you would need a ViewModelFactory class. This way we avoid the need for a factory class.

1 Like