getStateVariable method

StateVariable? getStateVariable()

Implementation

StateVariable? getStateVariable() {
  if (relatedStateVariable != null) {
    return null;
  }

  final Iterable<StateVariable> vars = action.service.stateVariables
      .where((x) => x.name == relatedStateVariable);

  if (vars.isNotEmpty) {
    return vars.first;
  }

  return null;
}