isInput property

bool isInput

Returns true iff this signal is an input 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 isInput =
    // this can be cached because parentModule is set at port creation
    parentModule?.isInput(this) ?? false;