toJson method

Map<String, dynamic> toJson()

Serialises this entry to a JSON-compatible map.

Implementation

Map<String, dynamic> toJson() => {
      'category': category,
      'message': message,
      'platform': platform,
      'appVersion': appVersion,
      'createdAt': createdAt.toIso8601String(),
      'screenshots': screenshots,
      if (metadata != null) 'metadata': metadata!.toJson(),
      if (sessionContext != null)
        'sessionContext': sessionContext!.toJson(),
      if (rating != null) 'rating': rating,
      if (npsScore != null) 'npsScore': npsScore,
    };