Declaration
compose().transformPreference(key: string, callback: unknown)nonisolated func transformPreference<K>(
_ key: K.Type = K.self,
_ callback: @escaping (inout K.Value) -> Void
) -> some View
where K : PreferenceKeyParameters
key*stringcallback*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.
- preferenceSets a value for the given preference.