DeviceSetup class

The DeviceSetup class orchestrates a series of setup steps for configuring a DeviceConfigContext. It follows the Chain of Responsibility pattern, where each setup step processes the device context and passes it to the next step in the sequence.

Example usage:

List<DeviceSetupStep> steps = [
  Step1(),
  Step2(),
  Step3(),
];

DeviceSetup deviceSetup = DeviceSetup(steps: steps);
DeviceConfigContext context = await deviceSetup.setup();

In this example, Step1, Step2, and Step3 are custom implementations of DeviceSetupStep. Each step modifies the DeviceConfigContext and passes it to the next step in the sequence.

Constructors

DeviceSetup({required List<DeviceSetupStep> steps})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setup([DeviceConfigContext context = DeviceConfigContext.empty]) Future<DeviceConfigContext>
Starts the setup process by passing the context to the first handler in the chain.
toString() String
A string representation of this object.
inherited

Operators

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