ServiceResult class
Class to manage the response from the server.
Constructors
-
ServiceResult.onHttpAccessError(int httpCode, Map<
String, String> headers, String body) -
factory
- ServiceResult.onInternalError(String errorMessageKey)
-
factory
-
ServiceResult.onParsingFailure(int httpCode, Map<
String, String> headers, String body, Exception exception) -
factory
-
ServiceResult.onSuccess(int httpCode, Map<
String, String> headers, dynamic entity) -
factory
-
ServiceResult.onSuccessWithNoEntity(int httpCode, Map<
String, String> headers) -
factory
Properties
- entity ↔ dynamic
-
The bean containing the response if any.
getter/setter pair
- exception ↔ Exception?
-
Exception if any.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
↔ Map<
String, String> -
The headers returned.
Can be used to get tokens, cookies, etc
getter/setter pair
- httpCode ↔ int
-
HTTP Code returned.
getter/setter pair
- result ↔ ServiceExecutionResult
-
Enum to find easily of the response if fine or not.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isSuccess(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited