CrashEventBase constructor

CrashEventBase({
  1. required String title,
  2. required String subtitle,
  3. required String originalMessage,
  4. String? message,
  5. String? traceId,
  6. String? messageStatus,
  7. String? hash,
  8. String buildHash = '',
  9. String networkType = '',
  10. String carrier = '',
  11. String ip = 'NA',
  12. String? locale,
  13. bool gpsEnabled = true,
  14. int? crashedAfter,
  15. String? category,
  16. String? stack,
  17. String? library,
  18. DateTime? timestamp,
})

Implementation

CrashEventBase({
  required this.title,
  required this.subtitle,
  required this.originalMessage,
  this.message,
  String? traceId,
  String? messageStatus,
  String? hash,
  this.buildHash = '',
  this.networkType = '',
  this.carrier = '',
  this.ip = 'NA',
  String? locale,
  this.gpsEnabled = true,
  int? crashedAfter,
  // Legacy fields for backward compatibility
  this.category,
  this.stack,
  this.library,
  DateTime? timestamp, // ← Issue #137: Timestamp opcional para reserva
}) : traceId = traceId ?? _generateTraceId(),
     messageStatus = messageStatus ?? 'flutter_captured',
     hash = hash ?? _generateHash(title, originalMessage),
     locale = locale ?? _getCurrentLocale(),
     crashedAfter = crashedAfter ?? DateTime.now().millisecondsSinceEpoch,
     _timestamp = timestamp ?? DateTime.now().toUtc();