From a1b1ff2c123911041e485ec00deed1d6f07482d5 Mon Sep 17 00:00:00 2001 From: Harry Terkelsen Date: Thu, 12 Dec 2019 13:44:58 -0800 Subject: [PATCH] Implement Path.from in the CanvasKit backend --- lib/web_ui/lib/src/engine/compositor/path.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web_ui/lib/src/engine/compositor/path.dart b/lib/web_ui/lib/src/engine/compositor/path.dart index 56d9883589823..b8b17190cf2a8 100644 --- a/lib/web_ui/lib/src/engine/compositor/path.dart +++ b/lib/web_ui/lib/src/engine/compositor/path.dart @@ -15,9 +15,9 @@ class SkPath implements ui.Path { fillType = ui.PathFillType.nonZero; } - // TODO(yjbanov): implement: https://github.com/flutter/flutter/issues/46812 SkPath.from(SkPath other) { - throw UnimplementedError('SkPath.from is not implemented in the CanvasKit backend'); + _skPath = js.JsObject(canvasKit['SkPath'], [other._skPath]); + fillType = other.fillType; } SkPath._fromSkPath(js.JsObject skPath) : _skPath = skPath;