support for lazy building widgets within viewport
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'dart:math';
|
||||
import 'dart:ui' show Offset;
|
||||
|
||||
extension OffsetCartesionOps on Offset {
|
||||
@@ -11,6 +12,10 @@ extension OffsetCartesionOps on Offset {
|
||||
return Offset(dx - other.dx, dy - other.dy);
|
||||
}
|
||||
|
||||
Point toPoint() {
|
||||
return Point(dx, dy);
|
||||
}
|
||||
|
||||
String coord() {
|
||||
return '(${dx.toStringAsFixed(2)}, ${dy.toStringAsFixed(2)})';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user