ViewDestinationProviding
@MainActor
public protocol ViewDestinationProviding<PresentationConfiguration> : DestinationProviding where Self.PresentationType == DestinationPresentationType<Self.PresentationConfiguration>
This protocol represents objects which construct and provide ViewDestinationable
objects, including their associated interface elements. Provider objects which conform to this protocol should build discrete Destinations based on their specific destination type.
-
An enum which defines available Destination presentation types. Typically this is
DestinationPresentationType
.Declaration
Swift
typealias PresentationType = DestinationPresentationType<PresentationConfiguration>
-
Builds and returns a new
ViewDestinationable
object based on the supplied configuration object.Declaration
Swift
@MainActor func buildDestination(for configuration: PresentationConfiguration, appFlow: some ViewFlowable<PresentationConfiguration>) -> (any ViewDestinationable)? where Self.PresentationConfiguration == DestinationPresentation<Self.DestinationType, Self.ContentType, Self.TabType>
Parameters
configuration
A
DestinationPresentationConfiguring
object which provides configuration data to construct the Destination.appFlow
A reference to the
Flowable
object which should call this method. This is necessary in cases where a Destination type needs to create children Destinations as part of its construction.Return Value
The newly created
ViewDestinationable
object.