NavArgumentBuilder
Kotlin
|Java
class NavArgumentBuilder
kotlin.Any | |
↳ | androidx.navigation.NavArgumentBuilder |
DSL for constructing a new NavArgument
Summary
Public constructors |
|
---|---|
<init>() DSL for constructing a new NavArgument |
Public methods |
|
---|---|
NavArgument |
build() Builds the NavArgument by calling NavArgument.Builder.build. |
Properties |
|
---|---|
Any? |
An optional default value for this argument. |
Boolean |
Controls if this argument allows null values. |
NavType<*> |
Sets the NavType for this argument. |
Public constructors
Public methods
Properties
defaultValue
var defaultValue: Any?
An optional default value for this argument.
Any object that you set here must be compatible with type, if it was specified.
type
var type: NavType<*>
Sets the NavType for this argument.
If you don't set a type explicitly, it will be inferred from the default value of this argument.