PhotoState class Null safety

The cubit state for a single photo.

Annotations

Constructors

PhotoState.failure(Failure failure)
Creates loading failed cubit state for a photo.
const
factory
PhotoState.initial()
Creates initial cubit state for a photo.
const
factory
PhotoState.inProgress()
Creates loading cubit state for a photo.
const
factory
PhotoState.success(Photo photo)
Creates loading succeeded cubit state for a photo.
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(_PhotoInitialState value), required TResult inProgress(_PhotoInProgressState value), required TResult success(_PhotoSuccessState value), required TResult failure(_PhotoFailureState value)}) → TResult
@optionalTypeArgs, inherited
mapOrNull<TResult extends Object?>({TResult initial(_PhotoInitialState value)?, TResult inProgress(_PhotoInProgressState value)?, TResult success(_PhotoSuccessState value)?, TResult failure(_PhotoFailureState value)?}) → TResult?
@optionalTypeArgs, inherited
maybeMap<TResult extends Object?>({TResult initial(_PhotoInitialState value)?, TResult inProgress(_PhotoInProgressState value)?, TResult success(_PhotoSuccessState value)?, TResult failure(_PhotoFailureState value)?, required TResult orElse()}) → TResult
@optionalTypeArgs, inherited
maybeWhen<TResult extends Object?>({TResult initial()?, TResult inProgress()?, TResult success(Photo photo)?, 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(), required TResult success(Photo photo), required TResult failure(Failure failure)}) → TResult
@optionalTypeArgs, inherited
whenOrNull<TResult extends Object?>({TResult initial()?, TResult inProgress()?, TResult success(Photo photo)?, TResult failure(Failure failure)?}) → TResult?
@optionalTypeArgs, inherited

Operators

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