Dependency injection

There are 2 main packages in AppKickstarter. One is template with the base of the template and one is app.

In app there is a appModule.kt file where there is a demo with a simple app that creates posts and list them on a paginated list. The screen models, datasources and use cases are defined in this appModule . You would want to override this, clear all the appModule and create your own unique application.

val appModule = module {
    factoryOf(::AddPostScreenModel)
    factoryOf(::PostsListScreenModel) 
    singleOf(::AddPost)
    singleOf(::PostsFirestore)
    singleOf(::SavePostPicture)
}

Last updated