Flutter, Dart: When you specify a field name as a character string and want to get (access the field) that field

前端 未结 0 1317
野趣味
野趣味 2021-01-22 05:12
class AAA{
  static int a=1;
  static int b=2;

  int c=3;
  int d=4;
}

void main(){

  print(AAA.a);  //1
  print(AAA.b);  //2

  String strA=\'a\';
  String strB=\'b\         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题