> For the complete documentation index, see [llms.txt](https://gdgaddis.gitbook.io/mobile-development-reference-tce-c01/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gdgaddis.gitbook.io/mobile-development-reference-tce-c01/products-feature/creating-products-cubit/creating-products-states.md).

# Creating Products States

First, create the "products\_state.dart" file under src/product/cubit/products/ with the following code.

```dart
part of 'products_cubit.dart';

@freezed
abstract class ProductsState with _$ProductsState {
  const factory ProductsState.error({@required String error}) =
      ProductsErrorState;

  const factory ProductsState.refreshing() = ProductsRefreshingState;

  const factory ProductsState.initial() = InitialProductsState;

  const factory ProductsState.loaded({
    @required List<Product> products,
  }) = ProductsLoadedState;

  const factory ProductsState.loading() = ProductsLoadingState;
}
```
