I would like to get the property of a class by passing a String name. How can I do that?
class A {
String fName ='Hello';
}
main() {
A a = A();
String var1='fName'; // name of property of A class
print (a.fName); // it is working fine
print (a.$var1); // it is giving error that no getter in A class. but I want to pass var1 and automatically get the associate property
}