CallToExecute<OUTPUT extends Object?> mixin Null safety

A mixin on Executable.

call function lets you use classes as methods.

Example:

class DeployCommand extends Executable<bool> with CallToExecute {

  final deployService = DeployService();

  @override
  bool execute() {
    deployService.validate();
    deployService.run();
    return true;
  }
}

Generally a command is executed like this.

final cmd = DeployCommand();
cmd.execute();

With CallToExecute mixin, you can now execute like this:

cmd();
Superclass Constraints

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

call() → OUTPUT
Calls the execute function.
execute() → OUTPUT
inherited
toString() String
A string representation of this object. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

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