useCurrentPage function

WorkflowPage useCurrentPage()

Implementation

WorkflowPage useCurrentPage() {
  try {
    final workflowProvider = useWorkflowProvider();
    return workflowProvider.currentPage;
  } catch (_) {
    throw Exception(
      "The current workflow page could not be determined, either you have no steps or the current step has no pages. If you use conditional steps or pages then consider if all conditions are false.",
    );
  }
}