You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
any plans to support class in DART:
class Point {
Point(this.x, this.y);
distanceTo(Point other) {
var dx = x - other.x;
var dy = y - other.y;
return Math.sqrt(dx * dx + dy * dy);
}
var x, y;
}
main() {
Point p = new Point(2, 3);
Point q = new Point(3, 4);
print('distance from p to q = ${p.distanceTo(q)}');
}
The text was updated successfully, but these errors were encountered:
Hello,
any plans to support class in DART:
class Point {
Point(this.x, this.y);
distanceTo(Point other) {
var dx = x - other.x;
var dy = y - other.y;
return Math.sqrt(dx * dx + dy * dy);
}
var x, y;
}
main() {
Point p = new Point(2, 3);
Point q = new Point(3, 4);
print('distance from p to q = ${p.distanceTo(q)}');
}
The text was updated successfully, but these errors were encountered: