I'm struggling with Dart library layout. I tried the following
lib/
A.dart
B.dart
my_lib.dart
where: A.dart
class A {
B myB;
}
B.dart
class A {
B myB;
}
my_lib.dart
#library('my_lib');
#source('A.dart');
#source('B.dart');
But in A.dart, in Dart Editor there is a problem: B - no such type. If I import B.dart in that file, via
#import('B.dart)',
but now it claims that part of library can only contain part directive. According to http://news.dartlang.org/2012/07/draft-spec-changes-to-library-and.html
partDirective:
metadata part stringLiteral “;”
;
But that doesn't work for me either. What am I missing?