init(description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:resolvers:)
Creates an app intent parameter with a default unit for the measurement.
Declaration
convenience init<Spec>(description: LocalizedStringResource? = nil, defaultValue: Double? = nil, defaultUnit: IntentParameter<Value>.ElectricPotentialDifference? = nil, defaultUnitAdjustForLocale: Bool = false, supportsNegativeNumbers: Bool = true, requestValueDialog: IntentDialog? = nil, inputConnectionBehavior: InputConnectionBehavior = .default, @ResolverSpecificationBuilder<Value.UnwrappedType> resolvers: @escaping () -> Spec) where Spec : ResolverSpecificationParameters
- description:
Additional details about this parameter.
- defaultValue:
The default value for this parameter. People can specify a different value.
- defaultUnit:
The default unit that should be selected when this parameter is initially created.
- defaultUnitAdjustForLocale:
Whether or not the default unit should adjust to match someone’s locale. Default value is
false. - supportsNegativeNumbers:
Whether or not this parameter supports negative number inputs. Default value is
true. - requestValueDialog:
A prompt that asks a person to provide the parameter value.
- inputConnectionBehavior:
An enum that indicates how this parameter receives the output from a preceding app intent.
- resolvers:
An object that converts a value of another type to this parameter’s type.