Breadcrumb.userInteraction constructor

Breadcrumb.userInteraction({
  1. String? message,
  2. SentryLevel? level,
  3. DateTime? timestamp,
  4. Map<String, dynamic>? data,
  5. required String subCategory,
  6. String? viewId,
  7. String? viewClass,
})

Implementation

factory Breadcrumb.userInteraction({
  String? message,
  SentryLevel? level,
  DateTime? timestamp,
  Map<String, dynamic>? data,
  required String subCategory,
  String? viewId,
  String? viewClass,
}) {
  return Breadcrumb(
    message: message,
    level: level,
    category: 'ui.$subCategory',
    type: 'user',
    timestamp: timestamp,
    data: {
      if (viewId != null) 'view.id': viewId,
      if (viewClass != null) 'view.class': viewClass,
      if (data != null) ...data,
    },
  );
}