This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Description
There is a number of reasons we want and need to do this:
- Less hand-written code to maintain.
- More alignment with the rest of AngularDart and other code generation packages.
- Handles tough problems like import resolution.
For example, one current bug in v5 alpha is that this will fail at compile-time:
import 'package:angular/angular.dart';
import 'foo.dart' as foo;
const fooToken = const OpaqueToken<foo.Foo>('fooToken');
@Injectable()
class Example {
Example(@Inject(fooToken) foo.Foo foo);
}
... because our generated code doesn't know Foo has an import prefix.
If we used code_builder we could automatically generate:
import 'foo.dart' as _i1;
initReflector() {
// Use _i1.Foo to represent 'Foo'.
}