FruitCategory constructor Null safety

FruitCategory(
  1. Fruit value,
  2. [Iterable<FruitCategory>? children]
)

Implementation

FruitCategory(Fruit value, [Iterable<FruitCategory>? children])
    : children = children?.toSet() ?? <FruitCategory>{},
      super(value);