bool isInState(Type state) { for (final statePath in _leafPaths) { if (statePath.isInState(state)) { return true; } } return false; }