toBindingData method

Map<String, dynamic> toBindingData()

Implementation

Map<String, dynamic> toBindingData() {
  return <String, dynamic>{
    'requestId': requestId,
    'status': status.name,
    'idle': isIdle,
    'loading': isLoading,
    'success': isSuccess,
    'failed': isFailure,
    'error': isFailure,
    if (endpoint != null) 'endpoint': endpoint,
    if (method != null) 'method': method,
    if (statusCode != null) 'statusCode': statusCode,
    if (message != null) 'message': message,
    if (errorCode != null) 'errorCode': errorCode,
    'data': data,
    'hasData': hasData,
    'fromCache': fromCache,
    if (updatedAt != null) 'updatedAtUtc': updatedAt!.toIso8601String(),
  };
}