isOutput property

bool isOutput

Returns true iff this signal is an output of its parent Module.

Note: parentModule is not populated until after its parent Module, if it exists, has been built. If no parent Module exists, returns false.


late final bool isOutput =
    // this can be cached because parentModule is set at port creation
    parentModule?.isOutput(this) ?? false;