I am trying to use the architecture recommended by android in a project and I was wondering if it is legitimate and recommended to pass the context
to the domain layer through the AndroidViewModel
:
class PlacesViewModel(application: Application): AndroidViewModel(application) {
val app = application
val domainLayer = DomainLayer()
fun example() {
domainLayer(app)
}
}
Aucun commentaire:
Enregistrer un commentaire