init abstract method

Future<void> init(
  1. ScopeInitContext ctx,
  2. void onStep(
    1. String reason
    )
)

Initializes this dependency, reporting the path of each step to onStep.

Keeps state in step with how it went. The step itself lives in the implementation and is not part of this interface: there is one way to initialize a dependency, and it is this one.

ctx carries the cancellation: a walk gives up where it next asks, which is between steps.

Implementation

Future<void> init(ScopeInitContext ctx, void Function(String path) onStep);