-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a95b4c
commit fe6fc18
Showing
5 changed files
with
121 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
12 changes: 12 additions & 0 deletions
12
src/templates/impl/directions/FeatureDirections.handlebars
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package {{ base_package }}.{{ flat module }}.impl.directions | ||
|
||
import androidx.navigation.NavType | ||
import androidx.navigation.navArgument | ||
import {{ base_package }}.{{ flat module }}.api.{{ pascal module }}FeatureEntry | ||
import {{ base_package }}.navigation.EmptyInput | ||
import {{ base_package }}.navigation.NavigationCommand | ||
import {{ base_package }}.navigation.NavigationCommandProvider | ||
|
||
object {{ pascal module }}Directions { | ||
object {{ pascal first_page }} : NavigationCommandProvider<EmptyInput> by {{ pascal module }}FeatureEntry | ||
} |
10 changes: 10 additions & 0 deletions
10
src/templates/impl/directions/SubfeatureDirectionTemplate.handlebars
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
object {{ pascal first_page }} : NavigationCommandProvider<EmptyInput> { | ||
override val featureRoute: String = "{{ kebab first_page }}/" | ||
override val arguments = emptyList<NamedNavArgument>() | ||
|
||
override fun destination(input: EmptyInput) = object : NavigationCommand { | ||
override val arguments = {{ pascal first_page }}.arguments | ||
override val destinationFeatureRoute = {{ pascal module }}FeatureEntry.featureRoute | ||
override val destination: String = "{{ kebab first_page }}/" | ||
} | ||
} |
This file contains 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
9 changes: 9 additions & 0 deletions
9
src/templates/impl/entry/SubfeatureComposableTemplate.handlebars
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
composable({{ pascal module }}Directions.{{ pascal first_page }}) { backstackEntry -> | ||
val rootComponent = rootComponent(backstackEntry, navController) | ||
|
||
val viewModel = injectedViewModel(backstackEntry) { | ||
rootComponent.{{ camel first_page }}SubcomponentFactory.create().viewModel | ||
} | ||
|
||
{{ pascal first_page }}Screen(viewModel = viewModel) | ||
} |