ProductVariantState class
ProductVariantState
is a freezed union of all possible states that can occur in the ProductVariantBloc
.
- Implementers
- Annotations
-
- @freezed
Constructors
- ProductVariantState.empty()
-
The
ProductVariantEmptyState
state represents the state where no product variants are loaded.constfactory -
ProductVariantState.fetched({required List<
ProductVariantModel> productVariants}) -
The
ProductVariantFetchedState
state represents the state where product variants have been loaded.constfactory - ProductVariantState.loading()
-
The
ProductVariantLoadingState
state represents the state where product variants are being loaded.constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> ({required TResult loading(ProductVariantLoadingState value), required TResult empty(ProductVariantEmptyState value), required TResult fetched(ProductVariantFetchedState value)}) → TResult -
inherited
-
mapOrNull<
TResult extends Object?> ({TResult? loading(ProductVariantLoadingState value)?, TResult? empty(ProductVariantEmptyState value)?, TResult? fetched(ProductVariantFetchedState value)?}) → TResult? -
inherited
-
maybeMap<
TResult extends Object?> ({TResult loading(ProductVariantLoadingState value)?, TResult empty(ProductVariantEmptyState value)?, TResult fetched(ProductVariantFetchedState value)?, required TResult orElse()}) → TResult -
inherited
-
maybeWhen<
TResult extends Object?> ({TResult loading()?, TResult empty()?, TResult fetched(List< ProductVariantModel> productVariants)?, required TResult orElse()}) → TResult -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> ({required TResult loading(), required TResult empty(), required TResult fetched(List< ProductVariantModel> productVariants)}) → TResult -
inherited
-
whenOrNull<
TResult extends Object?> ({TResult? loading()?, TResult? empty()?, TResult? fetched(List< ProductVariantModel> productVariants)?}) → TResult? -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited