createCow method Null safety

void createCow(
  1. Cow cow
)

Implementation

void createCow(Cow cow) {
  _cows.add(cow);
  notifyListeners();
}