Flow

public protocol Flow : AnyObject, Presentable, Synchronizable

A Flow defines a clear navigation area. Combined to a Step it leads to a navigation action

  • the Presentable on which rely the navigation inside this Flow. This method must always give the same instance

    Declaration

    Swift

    var root: Presentable { get }
  • adapt(step:) Default implementation

    Adapts an incoming step before the navigate(to:) function

    Default Implementation

    Declaration

    Swift

    func adapt(step: Step) -> Single<Step>

    Parameters

    step

    the step emitted by a Stepper within the Flow

    Return Value

    the step (possibly in the future) that should really by interpreted by the navigate(to:) function

  • Resolves FlowContributors according to the Step, in the context of this very Flow

    Declaration

    Swift

    func navigate(to step: Step) -> FlowContributors

    Parameters

    step

    the Step emitted by one of the Steppers declared in the Flow

    Return Value

    the FlowContributors matching the Step. These FlowContributors determines the next navigation steps (Presentables to display / Steppers to listen)