Monday, April 1, 2019

Generic Class



void main() {
  var slot = new Slot<Circle>();

  slot.insert(new Circle());
}

class Circle{
 
}

class Square{
 
}

class Slot<HFGVXV>{

  insert(HFGVXV circle){
    print("INSERT called");
  }
}

No comments:

Post a Comment