Result class

base http response bean

Constructors

Result({String returnCode, String returnMsg, dynamic returnData, String rootCause})
Result.causeHttpCancel({String cancel = "http cancel", String rootCause = "http cancel"})
http cancel
Result.causeTimeout({String msg = "timeout", String rootCause = "timeout"})
http timeout
Result.causeTokenExpired()
token expired
Result.causeUnkownError({String errcode = _errorUnkownCause, String msg = "unkown error", String rootCause = "unkown error"})
other errcode from server
Result.fromJson(Map<String, dynamic> json)
parse json

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
returnCode String
read / write
returnData ↔ dynamic
read / write
returnMsg String
read / write
rootCause String
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

isSuccess() bool
response success
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object. [...]
inherited

Operators

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

Constants

serverSuccess → const String
"0000"
serverTokenExpired → const String
"12"
serverTokenMissing → const String
"11"