ControllerDestinationProviding
@MainActor
public protocol ControllerDestinationProviding<PresentationConfiguration> : DestinationProviding where Self.PresentationType == DestinationPresentationType<Self.PresentationConfiguration>
This protocol represents objects which construct and provide ControllerDestinationable
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
ControllerDestinationable
object based on the supplied configuration object.Declaration
Swift
@MainActor func buildDestination(for configuration: PresentationConfiguration, appFlow: some ControllerFlowable<PresentationConfiguration>) -> (any ControllerDestinationable)? 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
ControllerDestinationable
object.