implementation "com.github.AlexExiv.Router-Android:router:$version"implementation "com.github.AlexExiv.Router-Android:annotations:$version"implementation "com.github.AlexExiv.Router-Android:fragment:$version"// add support of fragmentsimplementation "com.github.AlexExiv.Router-Android:compose:$version"// add support of composeimplementation "com.github.AlexExiv.Router-Android:fragmentcompose:$version"// add support of mixedkapt "com.github.AlexExiv.Router-Android:processor:$version"
Before reading this section, please make sure to read the sections about Fragments and Compose.
Application
In the first step, we need to configure our Application class. Your Application class should be inherited from the ComposeApplication class and create and initialize the RouterComponentImpl in the onCreateRouter method.
If you're not using Component injection, the App class should look like this:
You need to override the provideHostFragmentComposeFactory method to provide a factory that creates the host Fragment where the Router will display the Compose view in the case of Fragment to Compose view navigation. Below is an example of the implementation: