parseStrokeCap function

StrokeCap parseStrokeCap(
  1. List<XmlAttribute> el
)

Parses the strokeLineCap to a StrokeCap.

Implementation

StrokeCap parseStrokeCap(List<XmlAttribute> el) {
  final String? rawStrokeCap =
      getAttribute(el, 'strokeLineCap', def: 'butt', namespace: androidNS);
  switch (rawStrokeCap) {
    case 'butt':
      return StrokeCap.butt;
    case 'round':
      return StrokeCap.round;
    case 'square':
      return StrokeCap.square;
    default:
      return StrokeCap.butt;
  }
}