-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to allow non navigation arguments with default values.
- Loading branch information
Rafael Costa
committed
Sep 9, 2021
1 parent
dbb011e
commit 281cc15
Showing
11 changed files
with
85 additions
and
70 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
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
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
7 changes: 0 additions & 7 deletions
7
...ions-codegen/src/main/java/com/ramcosta/composedestinations/codegen/model/DefaultValue.kt
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...tions-codegen/src/main/java/com/ramcosta/composedestinations/codegen/model/Destination.kt
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
2 changes: 1 addition & 1 deletion
2
.../src/main/java/com/ramcosta/composedestinations/codegen/model/GeneratedDestinationFile.kt
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
8 changes: 5 additions & 3 deletions
8
...nations-codegen/src/main/java/com/ramcosta/composedestinations/codegen/model/Parameter.kt
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package com.ramcosta.composedestinations.codegen.model | ||
|
||
class Parameter( | ||
data class Parameter( | ||
val name: String, | ||
val type: Type, | ||
val defaultValue: DefaultValue | ||
val defaultValueSrc: String? | ||
) { | ||
val isMandatory: Boolean get() = !type.isNullable && defaultValue is None | ||
val hasDefault get() = defaultValueSrc != null | ||
|
||
val isMandatory: Boolean get() = !type.isNullable && !hasDefault | ||
} |
2 changes: 1 addition & 1 deletion
2
...destinations-codegen/src/main/java/com/ramcosta/composedestinations/codegen/model/Type.kt
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
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
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
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