parsePaintStrokeDashPattern function

List<double>? parsePaintStrokeDashPattern(
  1. Control control,
  2. String propName
)

Implementation

List<double>? parsePaintStrokeDashPattern(Control control, String propName) {
  var v = control.attrString(propName, null);
  if (v == null) {
    return null;
  }

  final j1 = json.decode(v);

  return j1["stroke_dash_pattern"] != null
      ? (j1["stroke_dash_pattern"] as List)
          .map((e) => parseDouble(e))
          .whereNotNull()
          .toList()
      : null;
}