toMap method

  1. @override
Map<String, dynamic> toMap()
override

Returns a map of properties. This method is used internally by the SDK.

Implementation

@override
Map<String, dynamic> toMap() {
  Map<String, dynamic> map = _getProperties();

  if (color != null) {
    map['color'] = color?.toHex();
  }

  if (thickness > 0.0) {
    map['thickness'] = thickness;
  }

  if (fillColor != null) {
    map['fillColor'] = fillColor?.toHex();
  }

  if (alpha != null) {
    map['alpha'] = alpha;
  }

  if (borderStyle != null) {
    map['borderStyle'] = borderStyle?.name;
  }

  if (blendMode != null) {
    map['blendMode'] = blendMode?.name;
  }

  return map;
}