extension Flow2Coordinator { private func showB() { let controllerBOutput = factory.makeControllerB() controllerBOutput.onFinishFlow = { [weak self] in self?.finishFlow?() } controllerBOutput.onNext = { [weak self] in self?.showC() } router.setRoot(module: controllerBOutput) } private func showC() { let controllerCOutput = factory.makeControllerC() controllerCOutput.onBack = { [weak self] in self?.router.popModule(animated: true) } router.push(controllerCOutput, animated: true, completion: nil) } }