I'm attempting to make a simple program in order to play around with Dart. When attempting to extend Vec2 with Circle, I receive an error message stating that 'no such type' exist Vec2
I have a structure such that:
Inside geom/geom.dart
#library("geom");
#import("dart:math", prefix:'Math');
#source("Vec2.dart");
#source("Circle.dart");
With two simple classes
Inside geom/Vec2.dart
class Vec2 {
num x;
num y;
}
Inside geom/Circle.dart
class Circle extends Vec2 {
num radius;
Circle(this.radius) : super();
}
What is the correct way to subclass in Dart? Must the Classes both exist in the same file?