fromValue static method

MPCollisionHandling fromValue(
  1. int value
)

Parses the integer value of the enum

Implementation

static MPCollisionHandling fromValue(int value) {
  switch (value) {
    case 0:
      return MPCollisionHandling.allowOverlap;
    case 1:
      return MPCollisionHandling.removeLabelFirst;
    case 2:
      return MPCollisionHandling.removeIconFirst;
    case 3:
      return MPCollisionHandling.removeIconAndLabel;
    default:
      throw ArgumentError(
          "A MPCollisionHandling scheme does not exist for the value $value");
  }
}