isState method

bool isState (
  1. Object testState
)

returns true if the current state of this SamModel is testState

testState should be one of the Enums ss values or a list of Enums ss values.

In the case of testState being a list, isState returns true when one in the matches the current state of SamModel.

Implementation

bool isState(Object testState) {
  if (testState is List) {
    String s = "";
    testState.forEach((Object obj) {s += "/$obj";});
    return s.contains(getHot("_samState"));
  } else {
    return (getHot("_samState") == "$testState");
  }
}