toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'success': success,
if (error != null) 'error': error,
if (data != null) 'data': data?.toJson(),
if (response != null) 'response': response,
if (duration != null) 'duration': duration,
'attempts': attempts,
'retryable': retryable,
};
}