setCategory method Null safety

void setCategory(
  1. String category
)

Implementation

void setCategory(String category) {
    this.category = category;
}