From a2acb60794adc699e6f59a703b59396f19df364d Mon Sep 17 00:00:00 2001 From: 6y Date: Mon, 17 Jul 2023 11:54:04 +0800 Subject: [PATCH] add CustomPoint.toOffset --- lib/src/misc/point.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/misc/point.dart b/lib/src/misc/point.dart index 2077bb6ee..7aa58a8e1 100644 --- a/lib/src/misc/point.dart +++ b/lib/src/misc/point.dart @@ -79,6 +79,8 @@ class CustomPoint extends math.Point { CustomPoint toDoublePoint() => CustomPoint(x.toDouble(), y.toDouble()); + Offset toOffset() => Offset(x.toDouble(), y.toDouble()); + @override String toString() => 'CustomPoint ($x, $y)'; }