Trying to pass null in a list.add(null) call but unable to do this since migrating to the null safety update.
this is the error on bloc
this is the model
I have tried adding ?. to the List but having no luck in fixing this.
You need to make StreamController
's dataType nullable, to add null.
final StreamController<List<ProductCategory>?> categoriesController;
Find more about understanding-null-safety.