toMap method
Converts the result to a map for serialization.
Note: pendingOperations and error are not serialized.
Implementation
Map<String, dynamic> toMap() {
return <String, dynamic>{
'userId': userId,
'duration': duration.inMilliseconds,
'syncedCount': syncedCount,
'failedCount': failedCount,
'conflictsResolved': conflictsResolved,
'totalBytesPushed': totalBytesPushed,
'totalBytesPulled': totalBytesPulled,
'bytesPushedInCycle': bytesPushedInCycle,
'bytesPulledInCycle': bytesPulledInCycle,
'wasSkipped': wasSkipped,
'wasCancelled': wasCancelled,
'skipReason': skipReason,
};
}