RenderStep constructor

const RenderStep(
  1. String name, {
  2. Set<String> passes = const <String>{},
  3. String? passPrefix,
  4. Set<RenderStep> needs = const <RenderStep>{},
  5. RenderSettings switchOff(
    1. RenderStepContext context
    )?,
  6. bool isOn(
    1. RenderStepContext context
    )?,
})

A step of a plugin's, or an application's — see "A step of one's own" above.

name is what the frame reports it under and must differ from every other step's; RendererSteps.addStep refuses a second step of one name. passes and passPrefix are the frame-graph nodes it owns: a node registered with RendererSteps.addNode(…, step: this) is owned whether or not it is listed. needs are the steps it cannot run without, built in or added. Give both switchOff and isOn, or neither: each is handed a RenderStepContext, whose RenderStepContext.settings it reads and switchOff returns changed.

Implementation

const RenderStep(
  this.name, {
  this.passes = const <String>{},
  this.passPrefix,
  this.needs = const <RenderStep>{},
  RenderSettings Function(RenderStepContext context)? switchOff,
  bool Function(RenderStepContext context)? isOn,
}) : assert(
       (switchOff == null) == (isOn == null),
       'a step with a setting of its own gives both switchOff and isOn',
     ),
     _off = switchOff,
     _isOn = isOn,
     _settingsOff = null,
     _settingsOn = null,
     _builtIn = false;