I'm fairly new to dart, so I'm still trying to figure out all of it's nuances. One thing I'm trying to do, just based on circumstances is to pass a class/type as an argument to a function so that I can access some static methods and properties.
Here's an example:
class WithStatic {
static final test = 'wwww';
}
void main() {
print(WithStatic.test);
test(WithStatic);
}
void test(dynamic cls){
// throws error Class '_Type' has no instance getter 'test'
print(cls.test);
}