anchorlessPresentation method

ShowcasePresentation? anchorlessPresentation(
  1. BuildContext context,
  2. int stepIndex
)

Implementation

ShowcasePresentation? anchorlessPresentation(
  BuildContext context,
  int stepIndex,
) {
  final state = _orchestrator.state;
  final config = state?.config;
  if (state == null || config is! SpotlightGuideConfig) return null;
  if (stepIndex < 0 || stepIndex >= config.steps.length) return null;
  final step = config.steps[stepIndex];
  if (step.anchorKey != null) return null;
  final scope = VariableScope.fromSchemas(
    state.campaign.config.defaultVariables,
    state.payload.variables,
  );
  final designScale = campaignCanvasDesignScale(
    viewportWidth: MediaQuery.sizeOf(context).width,
    designWidth: config.designWidth,
  );
  return _spotlightPresentation(
    step: step,
    config: config,
    scope: scope,
    designScale: designScale,
    disableBarrier: config.outsideTapBehavior == OutsideTapBehavior.nothing,
  );
}