Closed
Description
Many folks try to maintain short files. I often use Dart's part feature for this.
But if I have what would otherwise be a large class, I am limited in my ability to do this. In particular, all constructors must be in the main file.
So if I have multiple, complex constructors, my file gets big and I have no real way to mitigate this.
It would be useful if I can declare the components of a class in multiple files. The simple way to do this is to have multiple declarations of the same class in the same "file".
This sort of thing.
//foo.dart
part "foo_constructor.dart";
class Foo{
Foo._(){}
}
//foo_constructor.dart
part_of "foo.dart";
class Foo{
Foo() : Foo._();
}