inSwitch property

bool get inSwitch

Implementation

bool get inSwitch => thisOrAncestorOfType<SwitchStatement>() != null;