PostGenStep class final

A command the pipeline runs in the generated app after flutter pub get and code generation, such as flutterfire configure.

Steps run in the order of the contributions of a socket (see SocketContribution). The environment of a step includes, in its PATH, the directories of the tools that Preflight checks installed.

A step may continue another step, such as with a fix of a file that the tool of that step writes: it names that step by its id in followUpOf, and runs right after it rather than in its own place. A module continues its own steps and those that the modules it depends on publish the ids of, so a module knows nothing of the modules that continue its steps.

A step whose hosts leave out the operating system of the run does not apply to it. A step that applies runs unless:

  • it is external and the run skips external setup (--skip-external-setup);
  • it is interactive, or has a notice, and the run cannot ask the user;
  • a check that it needs has not passed;
  • it continues a step that is not done.

Then the pipeline prints the command for the user to run later, or fails generation if the step is not skippable; a step that continues a step that is not done is left for later with it either way. In a run that can ask, the user may also leave for later a skippable step that continues no other step, and a step with a notice, whether it continues another or not. A skippable step whose tool is missing, or that fails, is left for later too; any other step that fails fails generation.

The app is generated in a temporary directory and moved to its place afterwards, so a step must not write the absolute path of its working directory into the app. The files where Flutter records such paths, like ios/Flutter/Generated.xcconfig, are written again in the app's place.

Inheritance

Constructors

PostGenStep(ToolRef tool, List<String> arguments, {PostGenStepId? id, PostGenStepId? followUpOf, String? description, String? notice, bool interactive = false, bool skippable = false, bool external = false, List<String> needs = const [], Set<HostOperatingSystem> hosts = const {}, Set<Role<Object>> when = const {}})
Creates a step that runs tool with arguments.
const

Properties

arguments → List<String>
The arguments, after the tool's ToolRef.prefixArgs.
final
description → String?
What the step does, for progress output and instructions.
final
external → bool
Whether the step needs something outside the app, such as a network account.
final
followUpOf → PostGenStepId?
The step that this one continues, by its id, such as a step whose tool writes a file that this one fixes, or null if it continues none.
final
hashCode → int
The hash code for this object.
no setterinherited
hosts → Set<HostOperatingSystem>
The operating systems on which the step runs, or none for every one, such as macOS for a step that changes the Xcode project of the app.
final
id → PostGenStepId?
The id by which other steps continue this one (see followUpOf), or null if none does.
final
interactive → bool
Whether the step talks to the user, so the pipeline runs it with the terminal attached (see SmfProcessRunner.runInteractive).
final
needs → List<String>
The ids of the checks of the Preflight of the same contributor that the step needs, such as the check that its tool is installed.
final
notice → String?
What the user has to know before the step runs and its description does not tell, such as a side effect of the tool that it runs, or null if there is nothing of the kind.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skippable → bool
Whether the app is complete without the step, so the pipeline may print its command for later instead of running it.
final
tool → ToolRef
The tool to run.
final
when → Set<Role<Object>>
Roles that must all be present for the contribution to apply.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited