Declaration
compose().preference({
key: string,
value: unknown,
})nonisolated func preference<K>(
key: K.Type = K.self,
value: K.Value
) -> some View
where K : PreferenceKeyParameters
options.key*stringoptions.value*unknown
See also
More in Preferences.
- backgroundPreferenceValueReads the specified preference value from the view, using it to produce a second view that is applied as the background of the original view.
- overlayPreferenceValueReads the specified preference value from the view, using it to produce a second view that is applied as an overlay to the original view.
- transformPreferenceApplies a transformation to a preference value.