BMFCircle.fromMap constructor

BMFCircle.fromMap(
  1. Map map
)

map => BMFCircle

Implementation

BMFCircle.fromMap(Map map)
    : assert(map['center'] != null),
      assert(map['radius'] != null),
      super.fromMap(map) {
  center = BMFCoordinate.fromMap(map['center']);
  radius = map['radius'];
  width = map['width'];
  strokeColor = ColorUtil.hexToColor(map['strokeColor']);
  fillColor = ColorUtil.hexToColor(map['fillColor']);
  lineDashType = BMFLineDashType.values[map['lineDashType'] as int];
  dottedLine = map['dottedLine'];

  if (map['hollowShapes'] != null) {
    hollowShapes = new List<BMFHollowShape>();
    for (var item in hollowShapes) {
      BMFHollowShape hollowShape = BMFHollowShape.fromMap(item as Map);
      hollowShapes.add(hollowShape);
    }
  }
}