@@ -471,11 +471,11 @@ class FletCustomPainter extends CustomPainter {
471471 }
472472 for (var elem in (j as List )) {
473473 var type = elem["_type" ];
474- if (type == "moveto " ) {
474+ if (type == "MoveTo " ) {
475475 path.moveTo (parseDouble (elem["x" ], 0 )! , parseDouble (elem["y" ], 0 )! );
476- } else if (type == "lineto " ) {
476+ } else if (type == "LineTo " ) {
477477 path.lineTo (parseDouble (elem["x" ], 0 )! , parseDouble (elem["y" ], 0 )! );
478- } else if (type == "arc " ) {
478+ } else if (type == "Arc " ) {
479479 path.addArc (
480480 Rect .fromLTWH (
481481 parseDouble (elem["x" ], 0 )! ,
@@ -484,20 +484,20 @@ class FletCustomPainter extends CustomPainter {
484484 parseDouble (elem["height" ], 0 )! ),
485485 parseDouble (elem["start_angle" ], 0 )! ,
486486 parseDouble (elem["sweep_angle" ], 0 )! );
487- } else if (type == "arcto " ) {
487+ } else if (type == "ArcTo " ) {
488488 path.arcToPoint (
489489 Offset (parseDouble (elem["x" ], 0 )! , parseDouble (elem["y" ], 0 )! ),
490490 radius: Radius .circular (parseDouble (elem["radius" ], 0 )! ),
491491 rotation: parseDouble (elem["rotation" ], 0 )! ,
492492 largeArc: parseBool (elem["large_arc" ], false )! ,
493493 clockwise: parseBool (elem["clockwise" ], true )! );
494- } else if (type == "oval " ) {
494+ } else if (type == "Oval " ) {
495495 path.addOval (Rect .fromLTWH (
496496 parseDouble (elem["x" ], 0 )! ,
497497 parseDouble (elem["y" ], 0 )! ,
498498 parseDouble (elem["width" ], 0 )! ,
499499 parseDouble (elem["height" ], 0 )! ));
500- } else if (type == "rect " ) {
500+ } else if (type == "Rect " ) {
501501 var borderRadius = parseBorderRadius (elem["border_radius" ]);
502502 path.addRRect (RRect .fromRectAndCorners (
503503 Rect .fromLTWH (
@@ -509,25 +509,25 @@ class FletCustomPainter extends CustomPainter {
509509 topRight: borderRadius? .topRight ?? Radius .zero,
510510 bottomLeft: borderRadius? .bottomLeft ?? Radius .zero,
511511 bottomRight: borderRadius? .bottomRight ?? Radius .zero));
512- } else if (type == "conicto " ) {
512+ } else if (type == "QuadraticTo " ) {
513513 path.conicTo (
514514 parseDouble (elem["cp1x" ], 0 )! ,
515515 parseDouble (elem["cp1y" ], 0 )! ,
516516 parseDouble (elem["x" ], 0 )! ,
517517 parseDouble (elem["y" ], 0 )! ,
518518 parseDouble (elem["w" ], 0 )! );
519- } else if (type == "cubicto " ) {
519+ } else if (type == "CubicTo " ) {
520520 path.cubicTo (
521521 parseDouble (elem["cp1x" ], 0 )! ,
522522 parseDouble (elem["cp1y" ], 0 )! ,
523523 parseDouble (elem["cp2x" ], 0 )! ,
524524 parseDouble (elem["cp2y" ], 0 )! ,
525525 parseDouble (elem["x" ], 0 )! ,
526526 parseDouble (elem["y" ], 0 )! );
527- } else if (type == "subpath " ) {
527+ } else if (type == "SubPath " ) {
528528 path.addPath (buildPath (elem["elements" ]),
529529 Offset (parseDouble (elem["x" ], 0 )! , parseDouble (elem["y" ], 0 )! ));
530- } else if (type == "close " ) {
530+ } else if (type == "Close " ) {
531531 path.close ();
532532 }
533533 }
0 commit comments