Last active
May 13, 2024 23:01
-
-
Save CostaFot/24415c442f28a6b0f1d3432aed1f863d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : AppCompatActivity() { | |
@Inject lateinit var firstScreenTracker: FirstScreenTracker | |
@Inject lateinit var viewModelFactory: ViewModelFactory | |
override fun onCreate(savedInstanceState: Bundle?) { | |
DaggerFirstComponent.builder().build().inject(this) // build dagger component and inject | |
super.onCreate(savedInstanceState) | |
setContent { | |
AppTheme { | |
Surface { | |
FirstScreen( | |
navigate = { TODO() }, | |
firstScreenTracker = firstScreenTracker, // pass injected parameters downstream to composable | |
viewModelFactory = viewModelFactory | |
) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment