From 155ee3cb7c30934d840c07c36f16bb8ff7c5ac96 Mon Sep 17 00:00:00 2001 From: Harry Terkelsen Date: Wed, 8 Jan 2020 11:19:39 -0800 Subject: [PATCH] Implement Path.from in the CanvasKit backend (#14468) --- 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 56d988358..b8b17190c 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; -- GitLab