HttpResult<T> class

Annotations
  • @freezed

Constructors

HttpResult.failed(int? statusCode, Object? data)
factory
HttpResult.success(int statusCode, T data)
factory

Properties

copyWith → $HttpResultCopyWith<T, HttpResult<T>>
no setterinherited
data Object?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int?
no setterinherited

Methods

map<TResult extends Object?>({required TResult success(_HttpSuccess<T> value), required TResult failed(_HttpFailed<T> value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? success(_HttpSuccess<T> value)?, TResult? failed(_HttpFailed<T> value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult success(_HttpSuccess<T> value)?, TResult failed(_HttpFailed<T> value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult success(int statusCode, T data)?, TResult failed(int? statusCode, Object? data)?, 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 success(int statusCode, T data), required TResult failed(int? statusCode, Object? data)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? success(int statusCode, T data)?, TResult? failed(int? statusCode, Object? data)?}) → TResult?
inherited

Operators

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