getDisplayRuleValue method

Future<String> getDisplayRuleValue(
  1. String value,
  2. MPDisplayRule displayRule
)

Implementation

Future<String> getDisplayRuleValue(
    String value, MPDisplayRule displayRule) async {
  switch (value) {
    case "icon":
      String? value = await displayRule.getIconUrl();
      if (value != null) {
        return value;
      } else {
        return "null";
      }
    case "label":
      String? value = await displayRule.getLabel();
      if (value != null) {
        return value;
      } else {
        return "null";
      }
    case "polygonStrokeColor":
      String? value = await displayRule.getPolygonStrokeColor().toString();
      return value;
    case "polygonFillColor":
      String? value = await displayRule.getPolygonFillColor().toString();
      return value;
    default:
      return "choose a value";
  }
}