getFloorChangeDirection function

bool getFloorChangeDirection(
  1. dynamic progressContent
)

Implementation

bool getFloorChangeDirection(dynamic progressContent) {
  if (progressContent["currentIndication"]["distanceToNextLevel"] < 0) {
    return false;
  } else if (progressContent["currentIndication"]["distanceToNextLevel"] > 0) {
    return true;
  } else if (progressContent["nextIndication"]["distanceToNextLevel"] < 0) {
    return false;
  } else if (progressContent["nextIndication"]["distanceToNextLevel"] > 0) {
    return true;
  }
  return false;
}