Is there any way to avoid having to explicitly specify a class name in Dart, when using it multiple times?
Let's say I have something like
class VehicleType{
static const int BICYCLE = 0;
static const int CAR = 1;
static const int BUS = 2;
// ... etc ...
}
class VehicleGroup{
static List<int> YEARLY_INSPECTION =[
VehicleType.CAR,
VehicleType.BUS
];
static List<int> REQUIRES_LICENSE =[
VehicleType.CAR,
VehicleType.BUS
];
static List<int> NO_MINIMUM_AGE =[
VehicleType.BICYCLE
];
// ... etc ...
}
Is there any way I can avoid having to explicitly specify VehicleType.
for every member in a group? I'm thinking something like the with
statement that is available in some other languages like Javascript, Visual Basic and Object Pascal .