Index: packages/charted/lib/core/utils/rect.dart |
diff --git a/packages/charted/lib/core/utils/rect.dart b/packages/charted/lib/core/utils/rect.dart |
index 3e666ee0452849db2a7b3a80cabdcea555958265..beaa2cc46a4b7a6d8c1ad5fa78d3fc7cafa62394 100644 |
--- a/packages/charted/lib/core/utils/rect.dart |
+++ b/packages/charted/lib/core/utils/rect.dart |
@@ -10,18 +10,23 @@ part of charted.core.utils; |
/// Interface representing size and position of an element |
class Rect { |
- final num x; |
- final num y; |
- final num width; |
- final num height; |
- |
- const Rect([this.x = 0, this.y = 0, this.width = 0, this.height = 0]); |
- const Rect.size(this.width, this.height) |
- : x = 0, |
- y = 0; |
- const Rect.position(this.x, this.y) |
- : width = 0, |
- height = 0; |
+ final num _x; |
+ final num _y; |
+ final num _width; |
+ final num _height; |
+ |
+ num get x => _x; |
+ num get y => _y; |
+ num get width => _width; |
+ num get height => _height; |
+ |
+ const Rect([this._x = 0, this._y = 0, this._width = 0, this._height = 0]); |
+ const Rect.size(this._width, this._height) |
+ : _x = 0, |
+ _y = 0; |
+ const Rect.position(this._x, this._y) |
+ : _width = 0, |
+ _height = 0; |
bool isSameSizeAs(Rect other) => |
other != null && width == other.width && height == other.height; |