toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    if (device != null) 'device': device!.toJson(),
    if (app != null) 'app': app!.toJson(),
    if (tags != null) 'tags': tags!.map((tag) => tag.toJson()).toList(),
    if (request != null) 'request': request!.toJson(),
    if (error != null) 'error': error!.toJson(),
    if (user != null) 'user': user!.toJson(),
    if (lifeCycle != null) 'life_cycle': lifeCycle!.toJson(),
    if (ui != null) 'ui': ui!.toJson(),
    if (performanceBlock != null)
      'performance_block': performanceBlock!.toJson(),
    if (category != null) 'category': category,
    if (metric != null) 'metric': metric!.toJson(),
  };
}