PhotosState class Null safety

The cubit state for a list of photos.

Annotations

Constructors

PhotosState.failure(Failure failure)
Creates loading failed cubit state for photos.
const
factory
PhotosState.initial()
Creates initial cubit state for photos.
const
factory
PhotosState.inProgress({List<Photo>? currentPhotos})
Creates loading cubit state for photos.
const
factory
PhotosState.success(List<Photo> photos)
Creates loading succeeded cubit state for photos.
const
factory

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(_PhotosInitialState value), required TResult inProgress(_PhotosInProgressState value), required TResult success(_PhotosSuccessState value), required TResult failure(_PhotosFailureState value)}) → TResult
@optionalTypeArgs, inherited
mapOrNull<TResult extends Object?>({TResult initial(_PhotosInitialState value)?, TResult inProgress(_PhotosInProgressState value)?, TResult success(_PhotosSuccessState value)?, TResult failure(_PhotosFailureState value)?}) → TResult?
@optionalTypeArgs, inherited
maybeMap<TResult extends Object?>({TResult initial(_PhotosInitialState value)?, TResult inProgress(_PhotosInProgressState value)?, TResult success(_PhotosSuccessState value)?, TResult failure(_PhotosFailureState value)?, required TResult orElse()}) → TResult
@optionalTypeArgs, inherited
maybeWhen<TResult extends Object?>({TResult initial()?, TResult inProgress(List<Photo>? currentPhotos)?, TResult success(List<Photo> photos)?, 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(List<Photo>? currentPhotos), required TResult success(List<Photo> photos), required TResult failure(Failure failure)}) → TResult
@optionalTypeArgs, inherited
whenOrNull<TResult extends Object?>({TResult initial()?, TResult inProgress(List<Photo>? currentPhotos)?, TResult success(List<Photo> photos)?, TResult failure(Failure failure)?}) → TResult?
@optionalTypeArgs, inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited