📜  如何在 classdart 中运行函数 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:54.857000             🧑  作者: Mango

代码示例2
class Animals
{
  var animalList = ['dog','cat','cow'];

  // function for printing the list of animals

  void animalListPrinter(){
    for(var animal in animalList){
        print(animal);

     }
  }
}