processFCPTextButtonPressed method

void processFCPTextButtonPressed(
  1. String elementId
)

Implementation

void processFCPTextButtonPressed(String elementId) {
  l1:
  for (var t in templateHistory) {
    if (t.runtimeType.toString() == "CPPointOfInterestTemplate") {
      for (CPPointOfInterest p in t.poi) {
        if (p.primaryButton != null &&
            p.primaryButton!.uniqueId == elementId) {
          p.primaryButton!.onPress();
          break l1;
        }
        if (p.secondaryButton != null &&
            p.secondaryButton!.uniqueId == elementId) {
          p.secondaryButton!.onPress();
          break l1;
        }
      }
    }
    else
    {
      if (t.runtimeType.toString() == "CPInformationTemplate") {
        l2:
        for (CPTextButton b in t.actions) {
          if (b.uniqueId == elementId) {
            b.onPress();
            break l2;
          }
        }
      }
    }
  }
}