Assume we have a model in our models/ folder:
class ProductModel {
final String id;
ProductModel(this.id);
}
and then we create a provider for this model in providers/ folder accordingly:
class ProductProvider with ChangeNotifier {...}
The question is how to make the model being extended in this provider so that we avoid duplication? The solution:
class ProductProvider extends ProductModel with ChangeNotifier {...}
does not work in case if we later create another provider ProductsProvider
(plural) for lists.