PhotoLikeState class Null safety
The cubit state for the process of liking a photo.
- Annotations
Constructors
- PhotoLikeState.failure(Failure failure)
-
Creates loading failed cubit state for liking a photo.
constfactory
- PhotoLikeState.initial()
-
Creates initial cubit state for liking a photo.
constfactory
- PhotoLikeState.inProgress({required bool like})
-
Creates loading cubit state for liking a photo. [...]
constfactory
- PhotoLikeState.success({required bool like})
-
Creates loading succeeded cubit state for liking a photo. [...]
constfactory
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
map<
TResult extends Object?> ({required TResult initial(_PhotoLikeInitialState value), required TResult inProgress(_PhotoLikeInProgressState value), required TResult success(_PhotoLikeSuccessState value), required TResult failure(_PhotoLikeFailureState value)}) → TResult -
@optionalTypeArgs, inherited
-
mapOrNull<
TResult extends Object?> ({TResult initial(_PhotoLikeInitialState value)?, TResult inProgress(_PhotoLikeInProgressState value)?, TResult success(_PhotoLikeSuccessState value)?, TResult failure(_PhotoLikeFailureState value)?}) → TResult? -
@optionalTypeArgs, inherited
-
maybeMap<
TResult extends Object?> ({TResult initial(_PhotoLikeInitialState value)?, TResult inProgress(_PhotoLikeInProgressState value)?, TResult success(_PhotoLikeSuccessState value)?, TResult failure(_PhotoLikeFailureState value)?, required TResult orElse()}) → TResult -
@optionalTypeArgs, inherited
-
maybeWhen<
TResult extends Object?> ({TResult initial()?, TResult inProgress(bool like)?, TResult success(bool like)?, TResult failure(Failure failure)?, required TResult orElse()}) → TResult -
@optionalTypeArgs, inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
inherited
-
when<
TResult extends Object?> ({required TResult initial(), required TResult inProgress(bool like), required TResult success(bool like), required TResult failure(Failure failure)}) → TResult -
@optionalTypeArgs, inherited
-
whenOrNull<
TResult extends Object?> ({TResult initial()?, TResult inProgress(bool like)?, TResult success(bool like)?, TResult failure(Failure failure)?}) → TResult? -
@optionalTypeArgs, inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited