saveDisplayRuleValue method

void saveDisplayRuleValue(
  1. String value,
  2. MPDisplayRule displayRule,
  3. String setting
)

Implementation

void saveDisplayRuleValue(
    String value, MPDisplayRule displayRule, String setting) {
  switch (value) {
    case "icon":
      displayRule.setIcon(setting);
      break;
    case "label":
      displayRule.setLabel(setting);
      break;
    case "polygonStrokeColor":
      displayRule.setPolygonStrokeColor(
          getColorFromString(setting) ?? Colors.transparent);
      break;
    case "polygonFillColor":
      displayRule.setPolygonFillColor(
          getColorFromString(setting) ?? Colors.transparent);
      break;
  }
}